Closed ngtk closed 5 years ago
見るべきセッション動画 https://twitter.com/hirothings/status/1136677479316197378?s=21 このセッションSwiftUIの@State, @Binding の使い分けと なぜViewControllerが無くなったのかまで解説されててめっちゃ良かった。
https://developer.apple.com/videos/play/wwdc2019/226/
@State
@Binding
@Environment
@EnvironmentObject
今のところ使い分けがわかっていない。
https://developer.apple.com/documentation/swiftui/state_and_data_flow
下記に示すようなコードに対し2つの疑問を持った. ① someとは? ② bodyにreturn文が無いのはなぜ?
① について Opaque Result Typeと呼ばれるもの. これはリバースジェネリクス(引数ではなく返り値の型をジェネリクスにしたもの)のシンタックスシュガーである.用いることによって1)具体的な型を隠蔽,2)パフォーマンスを向上する事が出来る. 型が隠蔽されている例: https://twitter.com/inamiy/status/1135739529363464212?s=20 参考: https://qiita.com/koher/items/338d2f2d0c4731e3508f
② について
Swift5.1からメソッド内(クロージャ内?)にて評価する式が1つであれば,return文を省略できるようになった.
例: func addHonorific(_ name: String) -> String { name + "さん" }
参考: https://github.com/apple/swift-evolution/blob/master/proposals/0255-omit-return.md
struct PlayerView : View {
var body: some View {
VStack {
Text("Hello World")
Text("ハローワールド")
}
}
}
Apple公式の情報、コミュニティ発信の情報のそれぞれについて整理されている。 書籍やソースコード、動画など多数。
いくつかピックアップ
Qiitaがあった https://qiita.com/SCENEE/items/c3228eae672f0f799256
The Swift 5.1 features that power SwiftUI’s API https://www.swiftbysundell.com/posts/the-swift-51-features-that-power-swiftuis-api
Why
Where
Pearl Jam (Subject to change)
5F, MG Shirokanedai Building (Wantedly, Inc. Tokyo HQ)
Who
You are working for Wantedly? Sure, you can join anytime. If not, you need to contact us first. Or, you can "want to visit" the meetup, which you can find in www.wantedly.com/companies/wantedly/projects.
What
You write topics like below contents and we talk about these on the meetup. Every participant needs to write one topic at least.
Also, you can find new topics from the newsletters:
How
・・・
参加者は開催までに話したいことを少なくとも1トピックをコメントしましょう。 ネタ被りを避けるために、まずはタイトルだけでコメントすることを推奨します。 より多くの学びを得るためにどんな内容でもアウトプットを歓迎します!😊
cc/ @wantedly/ios
Edit this template
Previous issue
https://github.com/wantedly/ios_night/issues/55