iOS13でもSwiftUIでLazyなGridを実装したい! / use SwiftUI on iOS13

B069f7370d535b5060250cfa6bd38b83?s=47 kuroyam
October 16, 2020

iOS13でもSwiftUIでLazyなGridを実装したい! / use SwiftUI on iOS13

2020/10/16 ペパボモバイルテックカンファレンス

B069f7370d535b5060250cfa6bd38b83?s=128

kuroyam

October 16, 2020
Tweet

Transcript

  1. LVSPZBN(.01FQBCP *OD ϖύϘϞόΠϧςοΫΧϯϑΝϨϯε J04Ͱ΋4XJGU6*Ͱ-B[Zͳ (SJEΛ࣮૷͍ͨ͠ʂ

  2. γχΞϞόΠϧΤϯδχΞ ࠇాॣ!LVSPZBN 46;63*ࣄۀ෦ϓϩμΫτνʔϜ

  3. ࠓ೔࿩͢͜ͱ wJ04Λαϙʔτͨ͠4XJGU6*Ͱ6*$PMMFDUJPO7JFXత ͳ͜ͱΛ͍ͨ͠ w͍Ζ͍Ζࢼͯ͠ΈͨͷͰͳʹΛ΍͔ͬͨͱΘ͔ͬͨ͜ ͱΛ࿩͠·͢

  4. ͖͔͚ͬ w46;63*ͷ"OESPJEΞϓϦΛ'MVUUFSͰ࡞ͬͨΒ࠷ߴ ͩͬͨ w࠷ߴΛ஌ͬͯɺ6*,JUΛ࢖͏ͷ͕ͭΒ͘ͳͬͯ͠·ͬ ͨ w4XJGU6*ʹҠߦͰ͖Ε͹J04ΞϓϦ΋࠷ߴʹͳΔ͔΋ ͠Εͳ͍

  5. ͔͠͠4XJGU6*͸ w!BWBJMBCMF J04   w6*,JUͰͰ͖Δ͜ͱ͕·ͩશ෦Ͱ͖ΔΘ͚Ͱ͸ͳ͍ wಛʹ46;63*Ͱଟ༻͍ͯ͠Δ6*$PMMFDUJPO7JFX૬౰ ͷ΋ͷ͕ͳ͍ͷ͕ͭΒ͍

  6. J04Ͱ͍ͭʹʜ ࢀরIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOTXJGUVJMB[ZWHSJE

  7. Ͱ͢ΑͶ

  8. J04Ͱ΋ ͍͍ײ͡ʹ΍Δํ๏͸ͳ͍΋ͷ͔

  9. ௐࠪ

  10. ࢼͨ͜͠ͱ  2(SJEΛࢼͯ͠ΈΔ  -JTUΛ࢖͕ͬͯΜ͹Δ  6*7JFX3FQSFTFOUBCMFͰ͕Μ͹Δ

  11. ௐࠪͰ࡞Δը໘ w 46;63*ͰΑ͘࢖ΘΕΔྻOߦ ͷάϦου w γϯϓϧͳߦྻ͡Όͳ͍ෳࡶͳ 7JFXΛ࡞Δ͜ͱ͸ࠓճ͸ߟྀ͠ ͳ͍ w ॳظঢ়ଶͰ݅ɻԼ·ͰεΫ

    ϩʔϧͨ͠Β͞Βʹ݅௥Ճ ͢Δ
  12. 2(SJEΛࢼ͢

  13. 2(SJEͱ͸ w(JU)VC2.PCJMF2(SJE wl4XJGU6*DPMMFDUJPO7JFXzͰάάͬͨΒҰ൪্ͷهࣄ Ͱ঺հ͞ΕͯͨͷͰͱΓ͋͑ͣࢼͯ͠ΈΔ

  14. None
  15. දࣔ͸؆୯ʹͰ͖ͨ

  16. ࣍ͷ݅Λऔಘ͢ΔॲཧΛ ࣮૷ͯ͠ΈΔ

  17. ͓΍ʜ

  18. ແݶϧʔϓͨ͠ wԼ·ͰεΫϩʔϧͨ͠ΒPO"QQFBS͕ݺ͹ΕΔ͜ͱΛ ૝ఆ͍͕ͯͨ͠࠷ॳ͔Βݺ͹Ε͍ͯΔ w͜Ε͸ͨͿΜ͢΂ͯͷDPOUFOU͕࠷ॳ͔Β࡞ΒΕ͍ͯ ΔͷͰ͸

  19. ࣮૷ΛݟͯΈΔ

  20. ͲͷΑ͏ʹ(SJEΛ࡞͍ͬͯΔ͔ w(FPNFUSZ3FBEFSͰҐஔΛܭࢉ͠ɺॎํ޲ʹ͸ 74UBDLΛɺԣํ޲ʹ͸)4UBDLΛੜ੒͍ͯ͠Δ wͭ·Γ-B[Z-PBEʹରԠ͍ͯ͠ͳ͍ wσʔλ͕ߋ৽͞ΕΔͨͼʹ݅਺෼͚ͩ(SJEͷཁૉ͕ੜ ੒͞ΕΔ

  21. 2(SJE·ͱΊ w͍ΘΏΔແݶεΫϩʔϧʹ͸޲͍ͯͳͦ͞͏ w݅਺͕૿͑Δͱදࣔʹ͔͔Δ࣌ؒͱϝϞϦ࢖༻ྔ͕૿ Ճ w݅਺ݻఆͷ(SJEʹ͸͍͍͔΋  w4XJGU6*ͷػೳ͚ͩͰ࣮૷ͯ͠Δͷ͸

  22. -JTUΛ࢖͕ͬͯΜ͹Δ

  23. 4XJGU6*ͷ-JTU w6*,JUͰݴ͏ͱ͜Ζͷ6*5BCMF7JFXʹ૬౰͢Δ w-B[Z-PBEʹରԠ͍ͯ͠Δ wJ04͔Β࢖͑Δ

  24. -JTUͰ(SJEΛ࡞Δ w2(SJE͸74UBDLº)4UBDLͩͬ ͚ͨͲɺ-JTUº)4UBDLͳΒ͏· ͍͔͘͘΋  w-JTUͷҰཁૉʹྻ਺෼ͷσʔλ ΛೖΕͪΌ͏ wݸਓతʹJ04ελΠϧͱݺΜͰ ͍·͢

  25. (JTUIUUQTHJTUHJUIVCDPNLVSPZBNFFBBCCCDCGDCBEDBCD

  26. None
  27. -JTUͰ(SJE࡞Δ࡞ઓ·ͱΊ w-B[Z-PBEରԠͷ(SJEΛ࡞Δ͜ͱ͸Մೳ wύϑΥʔϚϯε໘ʹؔͯ͠͸ಛʹ໰୊ͳ͠ w-JTUʹ഑ஔ͢Δࡍʹ"SSBZΛૢ࡞͢ΔͷͰɺͦ͜ͷύϑΥʔϚϯε͕ѱ͍ ͱ஗͘ͳΔ wڧҾ͞͸൱Ίͳ͍  w-JTU΋·ͩػೳෆ଍ͳͱ͜Ζ͕͋Δ

  28. 6*7JFX3FQSFTFOUBCMFͰ ͕Μ͹Δ

  29. 6*7JFX3FQSFTFOUBCMFͱ͸ w؆୯ʹݴ͏ͱ4XJGU6*͔Β6*,JUͷίϯϙʔωϯτΛ࢖ ͏࢓૊Έ w͜ΕΛ࢖͑͹6*$PMMFDUJPO7JFXΛ4XJGU6*͔Β࢖͑Δ ͷͰ͸

  30. ϥΠϒϥϦ͋ͬͨ w(JU)VCBQQUFLTUVEJPT"4$PMMFDUJPO7JFX w͜ΕΛ࢖ͬͨͷͰ6*7JFX3FQSFTFOUBCMFʹ͍ͭͯৄ ͍͜͠ͱ͸ࠓճ࿩͠·ͤΜ

  31. ࢖ͬͯΈΔ

  32. "4$PMMFDUJPO7JFXΛ࢖ͬͯΈͯ wࠓͷͱ͜ΖҰ൪࢖͍΍ͦ͢͏ w6*$PMMFDUJPO7JFXͷओཁػೳ͸ͪΌΜͱ࢖͑Δ wҰ෦4XJGU6*޲͚ʹΠϯλʔϑΣʔεͷվྑ͕͞Εͯ ͍Δ w4XJGU6*ͷ4DSPMM7JFXͱ૬ੑ͕ѱ͍ͷͰɺ͜Ε͚ͩͰ Ұը໘࡞Δํ਑ΛऔΔඞཁ͕͋Γͦ͏

  33. 6*7JFX3FQSFTFOUBCMFʹ͍ͭͯิ଍ w6*$PMMFDUJPO7JFXҎ֎ʹ΋ɺ6*,JUͰ͸Ͱ͖Δ͕ 4XJGU6*Ͱ͸Ͱ͖ͳ͍͜ͱ͸ଟ͍ w8FC7JFXɺ1VMM5P3FGSFTIͳͲ wࠓͷͱ͜Ζආ͚ͯ͸௨Εͳ͍ͷͰ࢖͑ΔΑ͏ʹ͓ͯ͠ ͍ͨ΄͏͕Αͦ͞͏

  34. ·ͱΊ

  35. ·ͱΊ wJ04Ͱ΋͏·͘΍Ε͹-B[Z-PBEରԠͷ(SJEΛ࡞Ε Δ wݸਓతʹ͸ࠓ΍ΔͳΒ"4$PMMFDUJPO7JFXΛ࢖͏͔ ͳ͊ wཁ݅ʹԠͯ͡ύϑΥʔϚϯεͳͲͷݕূΛ͔ͯ͠Β΍ Γ·͠ΐ͏

  36. 4XJGU6*Ͳ͏ʁ w6*,JUͱൺ΂͔ͯͳΓੜ࢈ੑ͕ߴ͍ɻߴ଎Ͱ6*Λ࡞Ε Δ wݱ࣌఺Ͱ͸ػೳෆ଍ͳͱ͜Ζ͕͋Δ w͍·΍ΔͳΒ6*7JFX3FQSFTFOUBCMF͸ආ͚ͯ௨Εͳ ͦ͞͏ w࣮ઓಋೖ͸΋͏ͪΐͬͱઌ͔ͳʜ