warning: result of call to '~~~' is unused が出た時の対処法
Swift3.0では返り値のある関数を使った時に、その返り値を使用しなかった場合に警告が出るようです。
func addOne(num: Int) -> Int{ return num + 1 } addOne(num: 2) // warning: result of call to 'addOne' is unused
対策としては
Swift error: argument labels '(_:)' do not match any available overloads が出た時の対処法
error: argument labels '(_:)' do not match any available overloads が出た時に少し迷ったので、その対処法を書いておきます。
struct Cube { var area: Int init(height: Int ) { area = height * height } init(half height: Int){ area = height * height / 2 } } let cube = Cube(10) // Argument labels '(_:)' do not match any available overloads続きを読む
Swiftで文字列から部分的に文字列を取得する
Swift3.0で文字列から部分的に文字列を取得するには、substringを使いますが、その際引数にはIntではなく、Indexを使う必要があります。
続きを読むServer-Side Swift : Perfect のサンプルを動かしてみた
Perfectってなに??
2015年11月に発表された、Swift製のサーバサイドフレームワークです。
Perfect is a web server and toolkit for developers using the Swift programming language to build applications and other REST services. It lets developers build using only Swift to program both the client->facing and server-side of their projects. It’s the ideal backbone for cloud and mobile technologies. Developers can be more productive and efficient using Perfect to write less code and work in one >fundamental language for all their needs.
要約すると、開発者はSwiftだけで、これからはクライアントサイドも、サーバサイドも開発できますよ。そう。Perfectを使えばね。
てことです。
松本人志プレゼンツ【ドキュメンタル】第3話 脱落者続出....!!
12月14日、ドキュメンタル第3話が公開されました。
1話2話をまだみていないという方はこちらをどうぞ、
松本人志プレゼンツ【ドキュメンタル】の今後が楽しみ!! - 茶漬けの技術メモ
松本人志プレゼンツ【ドキュメンタル】第2話 ついに脱落者が.....!! - 茶漬けの技術メモ
第3話のタイトルは「脱落者続出」
第2話までで、ジミー大西、ダイノジ大地の2人が脱落しているので8人からのスタートとなる第3話ですが、
今回で4人の脱落者が出ます。
それでは、そんな波乱の第3話のレビューをします!!