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

What's new in Xcode9 Interface Building / 20170...

takasek
July 22, 2017

What's new in Xcode9 Interface Building / 20170627 #geek_garage_ios / 20170722 #fincwwdc

GEEK GARAGE iOS vol3 - connpass
https://geekgarage.connpass.com/event/58698/
(初稿)

および

WWDC2017振り返り勉強会@FiNC - connpass
https://finc.connpass.com/event/58947/
(改稿)

での発表資料です。

takasek

July 22, 2017
Tweet

More Decks by takasek

Other Decks in Programming

Transcript

  1. What's new in Xcode9 Interface Building by. 2017/6/27 GEEK GARAGE

    iOS vol3 (beta2) 2017/7/24 WWDC2017ৼΓฦΓษڧձˏFiNC (beta3) 1
  2. 8

  3. 10

  4. ॏཁ౓↗ 4 iOS11ͷίϯτϩʔϧηϯλʔ ʹɺจࣈαΠζมߋͷίϯτ ϩʔϧ΋ઃஔͰ͖ΔΑ͏ʹͳ ΔΒ͍͠ 4 ͜Ε·Ͱ͸ઃఆappͷԞਂ ͘ʹ͋ͬͨ 4

    ͜Ε͔Β͸ɺΑΓΧδϡΞ ϧʹϑΥϯταΠζ͕มߋ ͞Ε͏Δ 4 ͜Ε·ͰҎ্ʹҙࣝ͠ͳ͍ͱ Ϡό͍ 12
  5. UIFontMetricsͷڧԽ ίʔυͷ࿩ʹͳΔ͚Ͳ…iOS11Ҏ߱ɺ 4 System FontҎ֎Ͱ΋ Dynamic Type͕࢖͑ΔΑ͏ʹ 4 UIFontMetrics(forTextStyle: .title1)

    ɹɹɹɹɹɹɹɹɹɹ.scaledFont(for: customFont) 4 ೚ҙͷϑΥϯτ΍஋ΛɺDynamic TypeΛ௨ͯ͠ม׵Մ 4 UIFontMetrics(forTextStyle: .title1) ɹɹɹɹɹɹɹɹɹɹ.scaledValue(forValue: 40.0) 16
  6. 25

  7. 30

  8. 31

  9. 32

  10. 33

  11. 34

  12. 35

  13. SafeAreaʹ·ͭΘΔΫϥεͱϓϩύςΟ 4 UIView 4 var safeAreaLayoutGuide: UILayoutGuide { get }

    4 ViewͰɺbar౳ͷίϯςϯπʹΑΓӅ͞ΕΔ෦෼Λࣔ͢ 4 UIViewController 4 var additionalSafeAreaInsets: UIEdgeInsets { get set } 4 ViewControllerͰɺsafeAreaͷࡉ͔͍ิਖ਼ʹ࢖͏insets 4 UIScreen 4 var overscanCompensationInsets: UIEdgeInsets { get } 4 ScreenͰɺΤοδͷΫϦοϐϯάΛආ͚ΔͨΊͷinsets 36
  14. UIViewͷ৽ઃϓϩύςΟ class UIView { var safeAreaLayoutGuide: UILayoutGuide { get }

    var safeAreaInsets: UIEdgeInsets { get } // safeAreaInsets ͕ߋ৽͞ΕͨΒݺ͹ΕΔ func safeAreaInsetsDidChange() // insetsΛ૬ରతʹ͢Δ͔Ͳ͏͔ɻσϑΥͰ͸ true var insetsLayoutMarginsFromSafeArea: Bool { get set } // ݴޠͷ޲͖ʹΑΔϚʔδϯ΋ઃఆͰ͖ΔΑ͏ʹͳͬͨ var directionalLayoutMargins: NSDirectionalEdgeInsets { get set } } 38
  15. UIScrollViewͷ৽ઃϓϩύςΟ class UIScrollView { // enumɻ .automatic, .scrollableAxes, .never, .always

    ΛͱΔ var contentInsetAdjustmentBehavior : UIScrollViewContentInsetAdjustmentBehavior // ! automaticallyAdjustsScrollViewInsets ͷ୅ସ var adjustedContentInset: UIEdgeInsets { get } // adjustedContentInset ͕ߋ৽͞ΕͨΒݺ͹ΕΔ func adjustedContentInsetDidChange() // UIScrollViewͷ LalyoutGuide ΋औΕΔΑ͏ʹͳͬͨʂ var frameLayoutGuide: UILayoutGuide { get } var contentLayoutGuide: UILayoutGuide { get } } 39
  16. TableViewपΓͰ͸ 4 Cellͷseparator , UITableViewCell , UITableViewHeaderFoote rView ͸ɺ ࣗ਎ͷsafearea΁ͷinset

    Λઃ͚ͯ͘ΕΔ 4 ϔομɾϑολʹ͸ඞͣ UITableViewHeaderFoote rView Λ࢖͍·͠ΐ͏ 40