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

Mysteries of Auto Layout

Mysteries of Auto Layout

UIStackViewの話

A77456b262557e22986345f6d0555c58?s=128

nakajijapan

July 01, 2015
Tweet

Transcript

  1. Google I/O & WWDC ৘ใڞ༗ձ @nakajijapan Mysteries of Auto Layout

  2. !OBLBKJKBQBO 4PGUXBSF&OHJOFFS (.01&1"#0JOD J048FC.BD w 88%$͍ͬͯLN w ࠷ۙ͸झຯͰ.BD049ΞϓϦ΍ͬͯ·͢ w "7'PVOEBUJPOपΓΛझຯͰௐ΂ͯ·͢

  3. NKJMultiMovieCaptureView https://github.com/nakajijapan/NKJMultiMovieCaptureView NKJMovieComposer https://github.com/nakajijapan/NKJMovieComposer NKJPagerViewController https://github.com/nakajijapan/NKJPagerViewController etc

  4. J04"OESPJE ϋϯυϝΠυɺख࡞Γ࡞඼ͷ௨ൢɾൢചαΠτ NJOOF

  5. લஔ͖

  6. @misyobun

  7. WWDC2015Ͱ Objective-C͔ΒSwift΁ ͷҠߦʹ͍ͭͯApple ͷਓʹ㘤͍ͨ࿩ @misyobun

  8. AndroidΤϯδχΞ͕ Apple৴ऀʹม๴͢Δ ࿩Λָ͓͠Έ͍ͩ͘͞ @misyobun

  9. ຊ୊

  10. UIStackView

  11. Mysteries of Auto Layout, Part 1 Session 218

  12. The UIStackView class provides a streamlined interface for laying out

    a collection of views in either a column or a row. UIStackView
  13. %JTUSJCVUJPO "MJHONFOU 4QBDJOH 6*4UBDL7JFX$MBTT3FGFSFODF

  14. Layout Variables • axis • distribution • alignment • spacing

  15. Try!

  16. Try 1

  17. No UIStackView

  18. UIStackView

  19. Try 2

  20. No UIStackView

  21. No UIStackView

  22. UIStackView

  23. UIStackView

  24. UIStackView

  25. εοΩϦ!! UIStackView

  26. Good • ࣮૷͕؆୯ • ϨΠΞ΢τͷ؅ཧָ͕ • ੍໿ͷݟ௨͕͠ྑ͘ͳΔ • ։ൃऀ͚ͩͰ͸ͳ͘σβΠφʹΑΓϑϨϯυϦʔ

  27. Not Good • iOS9͚ͩαϙʔτ • ࣮຿ʹ͸౰෼ઌ… • ෳࡶͳϨΠΞ΢τʹαϙʔτ͠ͳ͍ • ͦͷ৔߹͸ࠓ·Ͱ௨Γʹ࣮૷

  28. ·ͱΊ ౰෼͸ ࣗ෼ͷϓϩμΫτͰਓபʹͳͬͯΈΑ͏ʂ ʢ৴ڼ৺ͷߴ·ΓΛײ͡ͳ͕Βʣ

  29. https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/ UIStackView_Class_Reference 6*4UBDL7JFX 6*,JU'SBNFXPSL3FGFSFODF

  30. ѹ ౗ త ײ ँ