Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
トレタでのSwift 3 対応
Search
Yoonchul Koh
November 29, 2016
Technology
4
7.6k
トレタでのSwift 3 対応
トレタでのSwift 3 対応について話しました
Yoonchul Koh
November 29, 2016
Tweet
Share
More Decks by Yoonchul Koh
See All by Yoonchul Koh
利用者の動きを可視化してアプリ開発に役立てる方法 Firebase Analyticsの導入とデータ活用について/user-tracking-firebase-analytics
yoonchulkoh
0
230
Xcode Extensions
yoonchulkoh
0
1.4k
Other Decks in Technology
See All in Technology
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.6k
SSMRunbook作成の勘所_20241120
koichiotomo
3
170
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
330
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
120
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
0
180
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
4
250
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
The Role of Developer Relations in AI Product Success.
giftojabu1
0
150
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
310
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Thoughts on Productivity
jonyablonski
67
4.3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
How to Ace a Technical Interview
jacobian
276
23k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Transcript
τϨλͰͷ Swift 3 ରԠ @y_koh 2016/11/29 potatotips #35
ࣗݾհ • τϨλͰiOSΤϯδχΞͬͯ·͢ • @y_koh
τϨλSwift 3 ରԠ͠·ͨ͠
ͭΒ͔ͬͨ
τϨλΞϓϦͷ֓ཁ • 201312݄ϦϦʔεɻϦϦʔεͯ͠3 • 201510݄Swift 2.0ಋೖɻ • Swift2ׂͰϑΝΠϧ180 • ίʔυྔશମͰ9ສ5ઍ͘Β͍
εέδϡʔϧײ • Ϗϧυ௨Δ·Ͱ1िؒ • ྃ·Ͱ2.5िؒ
ରԠॱং 1. ใऩू 2. ϥΠϒϥϦΞοϓσʔτ 3. Swift 3 Convert 4.
Τϥʔ௵͠ 5. ಈ࡞֬ೝ
ใऩू • [iOS][Swift] Swift 3.0ͷมߋ·ͱΊ http://dev.classmethod.jp/smartphone/iphone/ implemented_proposals_for_swift3/ • iQONΛSwift 3.0.1ʹΞοϓσʔτͨ͠ͱ͖ʹରԠͨ͠ϙΠ
ϯτ http://tech.vasily.jp/entry/update_swift_3_0_1 • ࠓɺSwift2 Ͱॻ͍͍ͯΔಉ๔ୡɻ࠷ݶ͓͖ͬͯͨ ͍ɺSwift2 ͷ··Ͱ࢝ΊΔ Swift3 ରࡦ http://qiita.com/ezura/items/e7703eb04d2d1f2946b9
ϥΠϒϥϦΞοϓσʔτ • Swift 3 ʹରԠ͍ͯ͠Δ͔ಓʹௐΔ • ରԠͯ͠ͳ͚ΕΓ͑ݕ౼ • Obj-CϥΠϒϥϦnullable, nonnullରԠͯͨ͠Γ
͢ΔͷͰ֬ೝͯ͠ΈΔͱྑ͍
Swift 3 Convert • ݁ߏ͔͔࣌ؒΔ • વʁ͏·͘ConvertͰ͖ͳ͍ͱ͜Ζ͕͋Δ
͏·͘ConvertͰ͖ͳ͔ͬͨͱ ͜Ζ • enumͷlower camel caseԽ • UIFont.systemFontOfSize(CGFloat) →UIFont.systemFont(ofSize: CGFloat)
• CGRectMake→CGRect(x: , y:) CGPointMake→CGPoint(x: , y: , width: , height:) • NSIndexPath(forRow: 0, inSection: 0) →IndexPath(row: 0, section: 0)
ରԠͷίπ • ஔscriptΛ࡞͓ͬͯ͘ͱྑ͍ • ৽͘͠ݟ͚ͭͨߏจΤϥʔscriptʹஔίϚϯυ ΛՃ࣮ͯ͠ߦΛ܁Γฦ͢ • ҙ֎ͱػցతʹஔͰ͖Δͱ͜Ζଟ͍ • ͠ΐ͏ͳ͍ΤϥʔͳΔࣗ͘ಈԽͰରԠ
େมͳͷϥΠϒϥϦ
Bolts • BFTask<AnyObject>(result: hoge)ͰArrayΛฦͤ ͳ͍ • AnyObject͕protocolʹͳΓɺArrayͦΕʹద ߹͍ͯ͠ͳ͍ • ํͳ͍ͷͰࠓNSArrayͰϥοϓͯ͠ฦͯ͠Δ
TZStackView • ܧঝ͍͕ͯͬͯͨ͠ɺclass͕openʹͳ͓ͬͯ ΒͣܧঝͰ͖ͳ͍ • ͳ͔ͥϨΠΞτ่͕ΕΔ
SwiftBond • v4→v5ʹͳΔʹ͋ͨͬͯ෦࣮͕ReactiveKit ʹͳͬͨ • ߏจͷॻ͖͑ͦͦ͜͜େม • ڍಈ͕ҟͳΔ • ͳ͔ͥແݶϧʔϓɻɻ
ͦͷଞࡉ͔͍ॴ • ໌ࣔతΩϟετ͕ඞཁʹ • (date as NSDate).mt_hourOfDay() • ͓Αͦ100Օॴ
ಈ࡞֬ೝ • વͳ͕ΒશମΛ֬ೝ͢Δඞཁ͕͋Δ • Ϋϥογϡ͢ΔͳΒ·ͩྑ͍ • ͠Εͬͱදࣔ͞Ε͍ͯͳ͍ͷ͋ͬͨΓ • ରԠલͷΞϓϦͱݟൺͳ͕Β֬ೝ͢Δ
·ͱΊ • ࢥͬͨҎ্ʹେมͰͨ͠ • Ϗϧυ௨͢·Ͱಈ࡞֬ೝ͕ҰͰ͖ͳ͍ • ϥΠϒϥϦʹΑͬͯ݁ߏڍಈ͕มΘͬͯ·͢ • ஔscriptΛ༻ҙ͢Δͱྑͦ͞͏
དྷͷSwift 4 Ͱ ָʹͳΔͣ