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

Storyboardを積極的に使うべきか?その役割に基づく一考察

 Storyboardを積極的に使うべきか?その役割に基づく一考察

2017.06.23 iOS UI実装勉強会 @ Sansan

39d636034f806b2bb51165a93774ab79?s=128

gaussbeam

June 26, 2017
Tweet

Transcript

  1. StoryboardΛੵۃతʹ࢖͏΂͖͔ʁ ʙͦͷ໾ׂʹجͮ͘Ұߟ࡯ʙ IBOZV!4BOTBO *OD 2017.06.23 #iOS_UI࣮૷ษڧձ

  2. Who? • HANYU, Koji • Sansan, Inc. iOS Developer •

    2017/3~ 
  3. Storyboardͷ̎ͭͷ໾ׂ w ετʔϦʔϘʔυ • Interface Builder 

  4. func chooseUiDevelopMethod(when situation: Situation) -> UIDevelopMethod { switch situation {

    case .developScreenTransition, .developSimpleView: return .byStoryboard case .developComplexView, .developLooksLikeOtherPlatformUI: return .byNibFilesAndCodess } } 
  5. case .developScreenTransition 

  6. 

  7.  DetailView

  8. • ϝϦοτ • ը໘ભҠ΍ಋઢͷෳࡶ౓͕WYSIWYGʹͳΔ • ͲΜͳભҠ(Push? Modal?)Λ͢Δͷ͔΋ḷΓ΍͍͢ • σϝϦοτ •

    performSegue, prepareForSegue͔Βಀ͛ΒΕͳ͍…  ը໘ભҠͷ࣮૷ʹ͸ StoryboardΛετʔϦʔϘʔυͱͯ͠࢖͏
  9. case .developSimpleView 

  10. 

  11. 

  12. • ϝϦοτ • ࠷ऴతͳը໘͕(ͦΕͳΓʹ)WYSIWYGʹͳΔ • ୹࣌ؒͰAuto LayoutରԠͰ͖Δ • σϝϦοτ •

    ࣗ༝౓͸௿͍(HIG͔Βͷҳ୤͸೉͍͠)  γϯϓϧͳViewͷ࣮૷ʹ͸ StoryboardΛInterface Builderͱͯ͠࢖͏
  13. case .developComplexView, .developLooksLikeOtherPlatformUI 

  14.  ※ΠϝʔδͰ͢

  15. 

  16. • ϝϦοτ • ը໘ͷߏ੒ཁૉ͕(ͦΕͳΓʹ)WYSIWYGʹͳΔ • Auto LayoutରԠ͸IBʹ೚ͤɼͩ͜ΘΓͷ࣮૷ՕॴͷΈίʔυͰ࣮ݱ • σϝϦοτ •

    ը໘ͷશମ૾/ΠϯλϥΫγϣϯ͸WYSIWYGʹͳΒͳ͍(Ͱ͖ͳ͍)  ෳࡶͳView΍ಠࣗͷςΠετͷUIΛ࣮૷͢Δ࣌͸ nibͱίʔυͰ࣮૷͢Δ
  17.  ͱ͸͍͑ɼ ※ੈքதͷ։ൃνʔϜΛ೰·ͤΔίϯϑϦΫτͷ໰୊΋͋Δ͕ɼ ࠓճ͸ʮ໾ׂ͔Β࢖͍ํ͸ߟ͑Δʯͱͯ͠࿩ΛਐΊ͖ͯͨͷͰׂѪ ϑΝΠϧ͸૿͑ɼ Ϗϧυ࣌ؒ΋૿͑Δ…

  18. None
  19. StoryboardΛੵۃతʹ࢖͏΂͖͔ʁ • Storyboardͷ2ͭͷ໾ׂ͔Βߟ͑Δ • ετʔϦʔϘʔυͱͯ͠͸YES
 ը໘ભҠɾಋઢͷWYSIWYGԽ • Interface Builderͱͯ͠͸ঢ়گʹΑΔ
 γϯϓϧͰHuman

    Interface Guidelines४ڌͳը໘͸YES
 ෳࡶͳը໘ɾಠࣗςΠετͷը໘͸NO