SwiftUI,Combine Framework,KeyPath - 堅固な関係からSwiftUI への閾値を下げる

0fb0b8c6eecbc8e0a3981501f6a6fea6?s=47 notoroid
January 18, 2020

SwiftUI,Combine Framework,KeyPath - 堅固な関係からSwiftUI への閾値を下げる

SwiftUI を理解するのに欠かせないCombine framework とKeyPath についてのプレゼンテーション。

0fb0b8c6eecbc8e0a3981501f6a6fea6?s=128

notoroid

January 18, 2020
Tweet

Transcript

  1. 4.

    ॆిใࠂ͞Μ #BUUFSFDFJWFS w όοςϦʔϞχλʔ ϢʔςΟϦςΟʔ  w ࠷େ୆ ࣮ػ ϦϞʔτ୆

     w ख࣋ͪͷJ1IPOF͔Βଞʹ͍࣋ͬͯΔ J1IPOF J1BEͳͲͷػثͷόοςϦʔঢ়ଶ֬ ೝՄೳ w ࣗ୐ʹ͋ΔJ1IPOFͷόοςϦʔঢ়ଶ֬ೝՄ ೳ
  2. 18.
  3. 25.

    4XJGUҎ߱ͷ,FZ1BUIͷ༻్ w ,70 ,FZ7BMVF0CTFSWJOH  w $PNCJOFGSBNFXPSL w NBQ 

    w BTTJHO  w 4XJGU6* w 'PS&BDI -JTU 'PSN  w FOWJSPONFOU
  4. 26.

    ॆిใࠂ͞ΜͰͷ,FZ1BUI࢖༻ճ਺ ؔ਺໊ ࢖༻਺ ϑϨʔϜϫʔΫ ༻్ NBQ  $PNCJOFGSBNFXPSL 'PS&BDI 4FMGTVQQPSUF

    E-PDBMFT  4XJGU6* 1SFWJFX FOWJSPONFOU aMPDBMF  MPDBMF  4XJGU6* 1SFWJFX BTTJHO UP PO  $PNCJOFGSBNFXPSL 'PS&BDI JEaTFMG  4XJGU6* FOWJSPONFOU aJT&OBCM FE  4XJGU6*
  5. 27.

    ॆిใࠂ͞ΜͰͷ,FZ1BUI࢖༻ճ਺ ؔ਺໊ ࢖༻਺ ϑϨʔϜϫʔΫ ༻్ NBQ  $PNCJOFGSBNFXPSL 'PS&BDI 4FMGTVQQPSUF

    E-PDBMFT  4XJGU6* 1SFWJFX FOWJSPONFOU aMPDBMF  MPDBMF  4XJGU6* 1SFWJFX BTTJHO UP PO  $PNCJOFGSBNFXPSL 'PS&BDI JEaTFMG  4XJGU6* FOWJSPONFOU aJT&OBCM FE  4XJGU6*
  6. 34.

    σʔλC σʔλC σʔλC σʔλC σʔλB σʔλB 1VCMJTIFST 4VCTDSJCFST 0QFSBUPST σʔλͷมܗ

    σʔλͷมܗɺσʔλͷྲྀ଎ɺσʔλͷྲྀྔͷՃ޻ σʔλͷൃߦऀ σʔλͷߪಡऀ
  7. 35.

    JNQPSU6*,JU JNQPSU$PNCJOF WBSBOZ$BODFMBCMF4FU"OZ$BODFMMBCMF  MFUQBTTUISPVHI4VCKFDU1BTTUISPVHI4VCKFDU*OU /FWFS  MFUQBTTUISPVHI4VCKFDU1BTTUISPVHI4VCKFDU4USJOH /FWFS 

    QBTTUISPVHI4VCKFDU NBQ\WBMVFJO 4USJOHa WBMVF  ^ TVCTDSJCF QBTTUISPVHI4VCKFDU  QBTTUISPVHI4VCKFDUTJOL\ WBMVF JO QSJOU QBTTUISPVHI4VCKFDUTJOLWBMVFa WBMVF   ^TUPSF JOBOZ$BODFMBCMF  1VCMJTIFS୲౰ 4VCTDSJCFS୲౰ 0QFSBUPS୲౰
  8. 44.

    MFUQBTTUISPVHI4VCKFDU1BTTUISPVHI4VCKFDU*OU /FWFS  QBTTUISPVHI4VCKFDUTFOE   QBTTUISPVHI4VCKFDUTJOL\ WBMVF JO QSJOU

    QBTTUISPVHI4VCKFDUTJOLWBMVFa WBMVF   ^TUPSF JOBOZ$BODFMBCMF  QBTTUISPVHI4VCKFDUTFOE   MFUDVSSFOU7BMVF4VCKFDU$VSSFOU7BMVF4VCKFDU*OU /FWFS   DVSSFOU7BMVF4VCKFDUTJOL\ WBMVF JO QSJOU DVSSFOU7BMVF4VCKFDUTJOLWBMVFa WBMVF   ^TUPSF JOBOZ$BODFMBCMF  'VUVSF*OU /FWFS\QSPNJTFJO 5ISFBETMFFQ GPS5J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WF$PNQMFUJPO\ DPNQMFUJPO JO TXJUDIDPNQMFUJPO\ DBTFGBJMVSF MFUFSSPS  QSJOU 'VUVSFMPDBMJ[FE%FTDSJQUJPOa FSSPSMPDBMJ[FE%FTDSJQUJPO   DBTFpOJTIFE CSFBL ^ ^ SFDFJWF7BMVF\ WBMVF JO QSJOU 'VUVSFTJOLWBMVFa WBMVF   ^ TUPSF JOBOZ$BODFMBCMF  ΤϥʔϨʔϯ͋Γ
  10. 52.
  11. 53.

    ॆిใࠂ͞Μ #BUUFSFDFJWFS w όοςϦʔϞχλʔ ϢʔςΟϦςΟʔ  w ࠷େ୆ ࣮ػ ϦϞʔτ୆

     w ख࣋ͪͷJ1IPOF͔Βଞʹ͍࣋ͬͯΔ J1IPOF J1BEͳͲͷػثͷόοςϦʔঢ়ଶ֬ ೝՄೳ w ࣗ୐ʹ͋ΔJ1IPOFͷόοςϦʔঢ়ଶ֬ೝՄ ೳ
  12. 57.
  13. 58.
  14. 59.
  15. 64.

    4XJGU6*ύʔπΛߏ੒͢Δཁૉ w ΧελϜͳ6*ύʔπΛϨΠΞ΢τػೳΛ࢖ͬͯσβΠϯ͢Δ w 4UBDLͰύʔπͷ഑ஔ w 4IBQFύʔπ $PMPS (SBEJFOU Ͱഎܠ৭

    w QBEEJOH FEHFT*HOPSJOH4BGF"SFBGSBNFͳͲͷαΠζࢦఆ w TIFFU BMFSUͰϞʔμϧɺΞϥʔτͷදࣔ w 4'4ZNCPMTΛଟ༻ͯ͠ΞΠίϯσβΠϯΛলུ
  16. 73.
  17. 79.

    ࢀߟʹͨ͠αΠττοϓ w Ґ UBCT ʲJ04ʳ$PNCJOFϑϨʔϜϫʔΫ·ͱΊ2JJUB w Ґ UBCT 'VDLJOH4XJGU6*$IFBU4IFFU w

    Ґ UBCT 6TJOH$PNCJOF w Ґ UBCT 4XJGU6*ͷ1SPQFSUZ8SBQQFSTͱσʔλ΁ͷΞΫηεํ๏ 2JJUB w Ґ UBCT 3Y4XJGUUP"QQMF`T$PNCJOF$IFBU4IFFU
  18. 81.
  19. 88.

    $PMPS͸ൺֱର৅ w ৭ $PMPS ͚͕ͩมߋ͞Εͨ7JFX͸มߋ͞ΕͨͱΈͳ͞Εͳ͍ ද ͕ࣔ൓ө͞Εͳ͍ ͜ͱ͕͋Δ w ໰୊͕ى͖ͨͷ͸5FYUͷGPSFHSPVOE$PMPS

    w ରࡦͱͯ͠͸৭͝ͱʹ$PMPSͷΠϯελϯεΛੜ੒͢Δؔ਺Λݺͼग़ ͢ͱ มԽͨ͠7JFXͱΈͳ͞ΕΔΒ͍͠  w ϓϨϏϡʔ͚ͩͩͱΘ͔Βͳ͍໰୊΋͋Δ
  20. 89.

    Ϟʔμϧදࣔͷ֊૚Τϥʔ w ৚݅ w ৚݅1: SwiftUIͷνϡʔχϯάʹࣦഊͯ͠ϨϯμϦϯά͕ෳ਺ݺ͹ΕΔ࣌ w ৚݅2: ϞʔμϧΛදࣔ͢Δɻ w

    ৚݅3: Ϟʔμϧදࣔ/ඇදࣔ੾Γସ͑ʹ@Publish ʹؚ·ΕΔ஋Λʹ༻͍͍ͯΔ w ৚݅4: ϞʔμϧදࣔΛෳ਺ճߦ͏ w ݁Ռ֊૚Τϥʔ͕ൃੜ(֊૚Τϥʔ͸iOS SDKͷΤϥʔ) w SwiftUI ͰWebݕࡧͰௐ΂ͯ΋߹கͨ͠έʔε͕Ұͭ΋ͳ͍!
  21. 94.