$30 off During Our Annual Pro Sale. View Details »

20180820 これからはじめるDynamicType

Kei Ito
August 20, 2018

20180820 これからはじめるDynamicType

Kei Ito

August 20, 2018
Tweet

More Decks by Kei Ito

Other Decks in Programming

Transcript

  1. ͜Ε͔Β͸͡ΊΔ %ZOBNJD5ZQF .PCJMF"DU04"," JUPL!ͦΒ͔ͥ

  2. JUPL!ͦΒ͔ͥ w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓʢʴ෭ۀˏ͸ͯͳʣ w ϞόΠϧΞϓϦΤϯδχΞ݉$&0 w IUUQJUPLKQ IUUQTPSBLB[FDPKQ

    !JUPL@UXJU
  3. ͦΖͦΖ J04Ͱͦ͏Ͱ͢Ͷ

  4. ͱ͍͏͜ͱ͸

  5. ͦΖͦΖ J04ͷαϙʔτΛ΍Ίͯ J04ͷ"1*͕࢖͑·͢Ͷ

  6. %ZOBNJD5ZQF

  7. None
  8. ͜Ε

  9. ͞Βʹେ͖͘

  10. ΍ͬͯΈΔ label.font = UIFont.preferredFont(forTextStyle: .body) label.adjustsFontForContentSizeCategory = true

  11. σόοάͷڧ͍ຯํ

  12. None
  13. None
  14. -BCFMؒͷϚʔδϯΛ ࣗಈௐ੔ firstLabel.firstBaselineAnchor. constraintEqualToSystemSpacingBelow( secondLabel.lastBaselineAnchor, multiplier: 1.0)

  15. None
  16. None
  17. override func traitCollectionDidChange( _ previousTraitCollection: UITraitCollection?) { stackView.axis = .horizontal

    if traitCollection.horizontalSizeClass == .compact { if traitCollection.preferredContentSizeCategory >= .extraExtraLarge { stackView.axis = .vertical } } } ྫʣԣDPNQBDUͰ99-Ҏ্ͷαΠζͳΒ TUBDL7JFXΛॎʹฒ΂Δ ϨΠΞ΢τΛಈతʹมߋ
  18. None
  19. None
  20. ը૾΋ࣗಈௐ੔ "TTFUTYDBTTFUT 6**NBHF7JFX imageView.adjustsImageSizeForAccessibilityContentSizeCategory = true

  21. None
  22. None
  23. ·ͱΊ w 88%$#VJMEJOH"QQTXJUI%ZOBNJD5ZQF w J04ͷαϙʔτΛऴΘΒͤͯɺJ04ͷػೳΛϑ ϧʹ࢖͓͏