Upgrade to Pro — share decks privately, control downloads, hide ads and more …

トレタでのSwift 3 対応

E4b19839ff3059133c51f097fbcd046c?s=47 Yoonchul Koh
November 29, 2016

トレタでのSwift 3 対応

トレタでのSwift 3 対応について話しました

E4b19839ff3059133c51f097fbcd046c?s=128

Yoonchul Koh

November 29, 2016
Tweet

Transcript

  1. τϨλͰͷ Swift 3 ରԠ @y_koh
 2016/11/29 potatotips #35

  2. ࣗݾ঺հ • τϨλͰiOSΤϯδχΞ΍ͬͯ·͢ • @y_koh

  3. τϨλSwift 3 ରԠ͠·ͨ͠

  4. ͭΒ͔ͬͨ

  5. τϨλΞϓϦͷ֓ཁ • 2013೥12݄ϦϦʔεɻϦϦʔεͯ͠3೥ • 2015೥10݄Swift 2.0ಋೖɻ • Swift͸2ׂͰϑΝΠϧ਺͸180 • ίʔυྔ͸શମͰ9ສ5ઍ͘Β͍

  6. εέδϡʔϧײ • Ϗϧυ௨Δ·Ͱ1िؒ • ׬ྃ·Ͱ2.5िؒ

  7. ରԠॱং 1. ৘ใऩू 2. ϥΠϒϥϦΞοϓσʔτ 3. Swift 3 Convert 4.

    Τϥʔ௵͠ 5. ಈ࡞֬ೝ
  8. ৘ใऩू • [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
  9. ϥΠϒϥϦΞοϓσʔτ • Swift 3 ʹରԠ͍ͯ͠Δ͔஍ಓʹௐ΂Δ • ରԠͯ͠ͳ͚Ε͹৐Γ׵͑΋ݕ౼ • Obj-CϥΠϒϥϦ΋nullable, nonnullରԠͯͨ͠Γ

    ͢ΔͷͰ֬ೝͯ͠ΈΔͱྑ͍
  10. Swift 3 Convert • ݁ߏ͔͔࣌ؒΔ • ౰વʁ͏·͘ConvertͰ͖ͳ͍ͱ͜Ζ͕͋Δ

  11. ͏·͘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)
  12. ରԠͷίπ • ஔ׵scriptΛ࡞͓ͬͯ͘ͱྑ͍ • ৽͘͠ݟ͚ͭͨߏจΤϥʔ͸scriptʹஔ׵ίϚϯυ Λ௥Ճ࣮ͯ͠ߦΛ܁Γฦ͢ • ҙ֎ͱػցతʹஔ׵Ͱ͖Δͱ͜Ζ͸ଟ͍ • ͠ΐ͏΋ͳ͍Τϥʔ͸ͳΔ΂ࣗ͘ಈԽͰରԠ

  13. େมͳͷ͸ϥΠϒϥϦ

  14. Bolts • BFTask<AnyObject>(result: hoge)ͰArrayΛฦͤ ͳ͍ • AnyObject͕protocolʹͳΓɺArray͸ͦΕʹద ߹͍ͯ͠ͳ͍ • ࢓ํͳ͍ͷͰࠓ͸NSArrayͰϥοϓͯ͠ฦͯ͠Δ

  15. TZStackView • ܧঝͯ͠࢖͍͕ͬͯͨɺclass͕openʹͳ͓ͬͯ ΒͣܧঝͰ͖ͳ͍ • ͳ͔ͥϨΠΞ΢τ่͕ΕΔ

  16. SwiftBond • v4→v5ʹͳΔʹ͋ͨͬͯ಺෦࣮૷͕ReactiveKit ʹͳͬͨ • ߏจͷॻ͖׵͑΋ͦͦ͜͜େม • ڍಈ͕ҟͳΔ • ͳ͔ͥແݶϧʔϓɻɻ

  17. ͦͷଞࡉ͔͍ॴ • ໌ࣔతΩϟετ͕ඞཁʹ • (date as NSDate).mt_hourOfDay() • ͓Αͦ100Օॴ

  18. ಈ࡞֬ೝ • ౰વͳ͕ΒશମΛ֬ೝ͢Δඞཁ͕͋Δ • Ϋϥογϡ͢ΔͳΒ·ͩྑ͍ • ͠Εͬͱදࣔ͞Ε͍ͯͳ͍΋ͷ΋͋ͬͨΓ • ରԠલͷΞϓϦͱݟൺ΂ͳ͕Β֬ೝ͢Δ

  19. ·ͱΊ • ࢥͬͨҎ্ʹେมͰͨ͠ • Ϗϧυ௨͢·Ͱಈ࡞֬ೝ͕Ұ੾Ͱ͖ͳ͍ • ϥΠϒϥϦʹΑͬͯ͸݁ߏڍಈ͕มΘͬͯ·͢ • ஔ׵scriptΛ༻ҙ͢Δͱྑͦ͞͏

  20. དྷ೥ͷSwift 4 Ͱ͸
 ָʹͳΔ͸ͣ