画面遷移の管理とMVVM

 画面遷移の管理とMVVM

Presentation Coordinator with MVVM architecture
第一回スタートアップiOS/Android勉強会

参考資料リンクや補足は次のQiita記事にまとめてあります。
http://qiita.com/yoching/items/e24197a38cccbba880c1

Ac3c0c2b458cdf0fe6a6e98a46e34322?s=128

Yoshikuni Kato

October 01, 2016
Tweet

Transcript

  1. ը໘ભҠͷ؅ཧͱMVVM @yoshikuni_kato ୈҰճελʔτΞοϓiOS/Androidษڧձ 2016/10/01 1

  2. Who am I? • Ճ౻༝܇ʢYoshikuni Katoʣ • @yoshikuni_kato • iOSΤϯδχΞ

    • Yahoo! Japan -> Φϋί • ʮϥδ΁͐ʯ͘Μ → 2
  3. OHAKO • ࣄۀɿUX/UIσβΠϯ & ։ൃ • ࣾһɿ20໊ऑʢ಺ɺΤϯδχΞ10໊ ऑɺiOS 2໊ʣ •

    ʢࠓͷͱ͜Ζʣ৽نडୗ։ൃϝΠϯ • Swi/ • try! Swi/ / iOSDCɹεϙϯαʔ • छʑϙδγϣϯืूதʂ • UI࣮૷޷͖ͳਓٻΉ 3
  4. ը໘ભҠΛ؅ཧ͢Δύλʔϯ Presenta(on Coordinator 4

  5. ը໘ભҠΛVC͔Β෼཭͢Δٞ࿦͕੝Μ • Presen'ng Coordinators by Soroush Khanlou, NSSpain(2015) • Boundaries

    in Prac'ce by Nonaka Ayaka, try!SwiF(2016) • MVVM-C In Prac'ce by Steve ScoM, UIKonf(2016) • Connec'ng View Controllers at SwiF Talk(objc.io), 2016 ↑ Φεεϝʂ • Names: Coordinator, Router/Wireframe (in VIPER), Naviga'on 5
  6. ը໘ભҠΛVC͔Β෼཭͢Δͱ͸ • presentViewController / pushViewController ͳͲΛ VCʹॻ͔ͳ͍ʂ →ɹVCͷੜ੒ɺʢDIతͳʣઃఆϩδοΫ΋VC͔Β֎ʹग़Δ →ɹVCಉ͕͓࢜ޓ͍Λࢀর͠ͳ͍ →ʮॱ൪ΛೖΕସ͑ΔʯʮભҠݩ/ઌΛม͑Δʯ͕༰қʹͰ͖Δ

    • ը໘ભҠΛ؅ཧ͢ΔΫϥε: Coordinator 6
  7. Coordinatorͷಈ࡞Πϝʔδ 7

  8. Coordinatorͷωετͷయܕྫ 8

  9. MVVMͰը໘ભҠΛ؅ཧ͢Δ 9

  10. Coordinator͸VMʹ࿈݁͢Δͷ͕Α͍ 10

  11. ࢀߟʣϢʔβʔΞΫγϣϯ͸VMͰॲཧ͢Δ 11

  12. VMͱCoordinatorͰɺVC͕෼ղ͞ΕΔ 12

  13. VMͱCoordinatorͰɺVC͕෼ղ͞ΕΔ 13

  14. ΄ͱΜͲVIPER? 14

  15. ·ͱΊ 15

  16. ·ͱΊ • ը໘ભҠΛVC͔Β෼཭͢ΔͱɺVC͕ؒૄʹͳΔ • MVVM-Cʹ͢Δͱ΄ͱΜͲVIPER? • ͍͖ͳΓVIPER͕೉͍͠ɺͱ͍͏৔߹͸ɺ͜ͷ͋ͨΓ͔Βऔ Γ૊Ήͷ΋ख͔΋ • ઃܭ೉͍͚͠Ͳ΍Γ͕͍͋Δ

    16
  17. ิ଍ ͜ͷࢿྉͰ͸ந৅తͳ࿩͹͔ΓͩͬͨͷͰɺ۩ମతͳίʔυ͸Լͷ ࢿྉΛࢀর͍ͯͩ͘͠͞ɻ • Presen'ng Coordinators by Soroush Khanlou, NSSpain(2015)

    • Boundaries in Prac'ce by Nonaka Ayaka, try!SwiF(2016) • MVVM-C In Prac'ce by Steve ScoM, UIKonf(2016) • Connec'ng View Controllers at SwiF Talk(objc.io), 2016 ↑ Φεεϝʂ 17