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

Awaiting for New UI in iOS 13

C6e92f16c5ac9a9eea94d904039a7fc8?s=47 100059
June 19, 2019

Awaiting for New UI in iOS 13

190619 CA.swift

C6e92f16c5ac9a9eea94d904039a7fc8?s=128

100059

June 19, 2019
Tweet

Transcript

  1. "XBJUJOHGPS/FX6*JOJ04 $"4XJGU 

  2. 4FOHPLV"LJIJTB "NFCBϒϩά J04ΤϯδχΞ !BLJIJTBTFO

  3. 88%$4FTTJPO w 8IBU`TOFXJOJ04BOE.BD%FTJHO w IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED w *NQMFNFOUJOH%BSL.PEFPOJ04 w IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED w

    .PEFSOJ[JOH:PVS6*JOJ04 w IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED
  4. 6QEBUF)VNBO*OUFSGBDF(VJEFMJOF w IUUQTEFWFMPQFSBQQMFDPNEFTJHOXIBUTOFX JEC w 6QEBUFBU+VOF 

  5. /FX6*JOJ04 w %BSLNPEF w 6*GPSJ04

  6. /FX6*JOJ04 w %BSLNPEF w 6*GPSJ04

  7. %BSLNPEF w J04͔Βαϙʔτ w ҉͍ΧϥʔύϨοτΛ༻͍ͨ6*Λඳը w ؀ڥޫ͕ऑ͍࣌ʹਪ঑ w ίϯςϯπʹΑΓूத w

    IUUQTEFWFMPQFSBQQMFDPNEFTJHOIVNBOJOUFSGBDFHVJEFMJOFT JPTWJTVBMEFTJHOEBSLNPEF
  8. )PXUP4FU%BSLNPEF ઃఆ ίϯτϩʔϧηϯλʔ

  9. 9DPEF γϛϡϨʔλ ɹ4FUUJOH%FWFMPQFS %FCVHHJOH5PPM

  10. 4VQQPSU#PUI4UZMFT w -JHIUNPEFͱ%BSLNPEFͷ྆ํΛαϙʔτ͢Δͷ͕޷·͍͠ʢਪ঑ʁʣ w ಛఆͷελΠϧʹదԠ͍ͯ͞͠ΔΞϓϦͷ৔߹͸ɺҰ෦ͷը໘PSશը໘ Ͱ%BSLNPEFΛαϙʔτ͢Δඞཁ͸ͳ͍ w Ϣʔβ͕࡞੒ͨ͠ίϯςϯπʹؔͯ͠͸ɺϢʔβ͕બ୒ͨ͠ίϯςϯπΛ ൓өͤ͞Δ͜ͱΛਪ঑

  11. %JTBCMFTVQQPSUGPS%BSL.PEFFOUJSFMZ w JOGPQMJTUͷLFZA6*6TFS*OUFSGBDF4UZMFAͷ஋ΛA-JHIUAͰΞϓϦશମͷ *OUFSGBDF4UZMFΛઃఆՄೳ

  12. 3FHBSEMFTTPGUIFTZTUFNTFUUJOH w XJOEPX WJFX WJFXDPOUSPMMFSͷAPWFSSJEF6TFS*OUFSGBDF4UZMFAϓϩύ ςΟͰಛఆͷ4UZMFΛબ୒Մೳ w 8JOEPX͢΂ͯʹదԠ͞ΕΔ w 7JFXT4VCWJFXTʹ4UZMF͕దԠ͞ΕΔ

    w 7JFX$POUSPMMFS$IJME7JFX$POUSPMMFSʹ4UZMF͕దԠ͞ΕΔ
  13. *NQMFNFOUJOH%BSLNPEF w $PMPS w *NBHF w .BUFSJBMTBOE7JCSBODZ w $POUSPMTBOE#BS

  14. 4ZTUFN$PMPS w -JHIUNPEFͱ%BSLNPEFͷΧϥʔΛ ఏڙ %ZOBNJD$PMPS  w ΞΫηγϏϦςΟʔͷzίϯτϥετΛ ্͛Δzͱzಁ໌౓ΛԼ͛ΔzΛߦͳͬͨ ࣌ͷΧϥʔ΋ఏڙ

  15. (SBZ w (SBZd(SBZ͕௥Ճ w ൒ಁ໌ͷάϨʔ৭΋ఏڙ w ަࠩ͢Δཁૉʹରͯ͠࢖͏ͷ͕ద੾ɻ ྫ͑͹ɺάϦουϥΠϯ w ৭͕ॏͳ͍ͬͯΔͱ͖ʹɺBMQIB஋Λม

    ߋ͢ΔͷΛආ͚Δ
  16. 4FNBOUJD$PMPS w ৭ͷ໨తΛදͨ͠$PMPSɻ6*ཁૉͷ৭ͷ ࢦఆʹద͍ͯ͠Δɻ w MBCFM MJOL QMBDFIPMEFS TFQBSBUPS w

    pMMΞΠίϯ΍ਤܗ BMQIB͕ະຬͰ ͋Γɺഎܠʹ৭͕͋Δͱ͜ΖͰͷ࢖༻ Λ૝ఆ
  17. #BDLHSPVOE$PMPS w 4FNBOUJD$PMPS w ֊૚Խ w 1SJNBSZ 4FDPOEBSZ ͕͋ΓɺॏͶͯ 7JFXΛ֊૚Խ͢Δ͜ͱΛ૝ఆ

    w &MFWBUFE$PMPS POMZEBSL  w EBSLNPEFͰ6*͕ॏͳ͍ͬͯΔͱ͖ʹɺ গ͠໌Δ͍&MFWBUFE$PMPS͕࢖ΘΕΔɻ w -JHIUNPEFͰ6*͕ॏͳ͍ͬͯΔͱ͖͸υϩο ϓγϟυʔΛ෇༩͢ΔͷΛਪ঑
  18. $VTUPN$PMPS w ίʔυͰఆٛ w "TTFU$BUBMPHͰఆٛ extension UIColor { // you

    provide creates a new color object based on the traits in the provided trait collection. @available(iOS 13.0, *) public init(dynamicProvider: @escaping (UITraitCollection) -> UIColor) } extension UIColor { static let dynamicColor = UIColor { (traitCollection: UITraitCollection) -> UIColor in if traitCollection.userInterfaceStyle == .dark { return .white } else { return .black } } }
  19. $VTUPN$PMPS w ίʔυͰఆٛ w "TTFU$BUBMPHͰఆٛ J04Ҏ্ %BSL"QQFBSBODFʹ%BSLNPEF༻ͷը૾Λ௥Ճ

  20. *NBHF w %ZOBNJD*NBHFT w "TTFU$BUBMPHͰ"QQFBSBODFͷ%BSLʹ%BSLNPEF༻ͷը૾Λ௥Ճ w 4'4ZNCPMFT w ՄೳͳݶΓ࢖༻͢Δ͜ͱΛਪ঑ w

    -JHIUNPEFͱ%BSLNPEFͲͪΒʹ΋࠷దԽ͞Εͨ৭Λอ࣋
  21. .BUFSJBMTBOE7JCSBODZ w .BUFSJBMT 6*#MVS&⒎FDU  w എޙʹඳը͞Εͨίϯςϯπ΁ͷΤϑΣΫτ w 7JCSBODZ 6*7JCSBODZ&⒎FDU

     w ಺෦ʹ഑ஔ͞Εͨίϯςϯπ΁ͷΤϑΣΫτ
  22. .BUFSJBMT w 6*#MVS&⒎FDU4UZMFʹ5IJDL 3FHVMBS 5IJO 6MUSBUIJO͕௥Ճ͞Εͯɺ -JHIUNPEFͱ%BSLNPEFʹରԠ

  23. 7JCSBODZ w 6*7JCSBODZ&⒎FDU4UZMFʹMBCFM pMM TFQBSBUPS͕௥Ճ͞Εͯɺ-JHIU NPEFͱ%BSLNPEFʹରԠ

  24. "EBQU"NFCBUP%BSLNPEF

  25. "NFCBϒϩάͷ هࣄͷฤूը໘ -JHIUNPEF

  26. "NFCBϒϩάͷ هࣄͷฤूը໘ %BSLNPEF

  27. w /BWJHBUJPO#BS❌ w .FOV#VUUPOT❌ w 5BCMF7JFX$FMM❌

  28. ᶃఆٛ͞Ε͍ͯΔ $VTUPN$PMPSΛ %ZOBNJD$PMPS΁มߋ

  29. .FOV#VUUPOT

  30. ᶄ4UPSZCPBE্Ͱͷ $PMPSͷఆٛΛίʔ υͰͷࢦఆʹมߋ

  31. %BSLNPEF͔Β -JHIUNPEFʹมߋ 4UBUVT#BS  .FOV#VUUPO

  32. 5SBJU TUZMF ͕มԽͨ͠ ͱ͖ʹɺ$"-BZFS͸ಈ తʹ৭͕มΘΒͳ͍ͷͰ ରԠ͕ඞཁ

  33. ᶅ5SBJU͕ߋ৽͞Εͨ ޙʹຖճ$"-BZFSͷ ΧϥʔΛߋ৽

  34. ͍͍ͩͨ׬ྃʁ

  35. ͦͷଞͷରԠ w 6*"DUJWJUZ*OEJDBUPS7JFXͷ6*"DUJWJUZ*OEJDBUPS7JFX4UZMF w NFEJVN MBSHF⭕ɺHSBZ XIJUF❌ w J04Ͱ"1*͕6QEBUF͍ͯ͠Δ"UUSJCVUFE5FYU 4UBUVTCBS΋ରԠ͕ඞཁ

    w ΞΠίϯͷ4'4ZNCPMԽ w 4FNBOUJD$PMPSͷదԠ͢Δͷ͔ʁ w σβΠφʔ΍σΟϨΫλʔͱ૬ஊ
  36. /FX6*JOJ04 w %BSLNPEF w 6*GPSJ04

  37. New6*JOJ04 w %BSLNPEF w 6*GPSJ04 w 'MFYJCMF6* w 4IFFU w

    6*4FBSDI$POUSPMMFS w .VMUJQMF4FMFDUJPO(FTUVSFT
  38. 'MFYJCMF6* w "QSJM·Ͱʹඞཁͳ'MFYJCMF6*ͷରԠ w εϓϥογϡը໘Ͱ-BVODI*NBHF͕ EFQSFDBUFEʹͳΓɺ-BVODI 4UPSZCPBSETͰͷ࣮૷͕ඞཁ w J04ରԠͷ৔߹ͷͲͷσόΠεαΠζʹ ΋ରԠ͕ඞཁ

    w J1BEͷϚϧνλεΫػೳͷ࣮૷͕ඞཁ
  39. 4IFFU w EFGBVMUͷ.PEBM͕ηϛϞʔμϧͷ4IFFU w ਪ঑߲໨ w ෳࡶͳॲཧΛϞʔμϧ಺Ͱ͸͠ͳ͍ w Ϟʔμϧ಺ʹด͡ΔϘλϯΛ഑ஔ w

    Ϟʔμϧ಺ͰͷॲཧΛද͢λΠτϧΛೖ ΕΔ w ॲཧΛதஅ͢Δͱ͖͸ɺΞϥʔτΛදࣔ
  40. 6*.PEBM1SFTFOUBUJPO4UZMF w σϑΥϧτ஋͕BVUPNBUJDʹมߋ w ΄ͱΜͲ͸QBHF4IFFUͰͷදࣔ w -BOETDBQFϞʔυͷͱ͖ʹ͸ɺGVMM4DSFFO͕ దԠ͞ΕΔɻ w 6**NBHF1JDLFS$POUSPMMFSͰͷΧϝϥΛදࣔ

    ͢Δͱ͖͸GVMM4DSFFO͕ઃఆ w ࠓ·Ͱͷશը໘ද͍ࣔͨ͠৔߹͸GVMM4DSFFO Λબ୒
  41. "EBQU"NFCB w ͍͍ײʁʁ w มߋ͕͋ͬͨͱ͖ w ΩϟϯηϧϘλϯͰͷด͡ΔॲཧͰ ͸ɺਖ਼ৗʹΞϥʔτ͕දࣔ͞ΕΔ w εϫΠϓδΣενϟʔͰͷด͡Δॲཧ

    Ͱ͸Ξϥʔτ͕දࣔ͞Εͳ͍%
  42. %JTBCMJOH1VMMJOH%PXOB4IFFU w ด͡Δ࣌ͷରԠ w มߋ͕͋Δͱ͖ w ˠJT.PEBM*O1SFTFOUBUJPOUSVF w ˠด͡Δͱ͖ʹݺ͹ΕΔ 6*"EBQUJWF1SFTFOUBUJPO$POUSPMMFS%

    FMFHBUFͷϝιου಺ͰॲཧΛߦ͏
  43. 6*4FBSDI$POUSPMMFS w 6*4FBSDI$POUSPMMFS͕ΑΓ$VTUBNJ[FͰ͖ΔΑ͏ʹͳͬͨɻ

  44. 6*4FBSDI$POUSPMMFS w BVUPNBUJDBMMZ4IPXT$BODFM#VUUPO w $BODFM#VUUPOͷදࣔʢEFGBVMUUSVFʣ w BVUPNBUJDBMMZ4IPXT4DPQF#BS w 4DPQF#BSͷදࣔʢEFGBVMUUSVFʣ w

    TIPXT4FBSDI3FTVMUT$POUSPMMFS w ݕࡧ͕Մೳʹͳͬͨͱ͖ͷݕࡧ݁Ռͷը໘ ΛදࣔʢEFGBVMUUSVFʣ
  45. 6*4FBSDI5FYU'JFME w ݕࡧը໘ͷ5FYU'JFME΋ΧελϚΠζՄೳ w 6*4FBSDI5FYU'JFME w TFBSDI#BS͕6*4FBSDI5FYU'JFMEΛอ࣋ w 6*4FBSDI5FYU'JFMEͷมߋͰΧελϚΠ ζՄೳ

  46. 6*4FBSDI5PLFO w 6*4FBSDI5FYU'JFMEͷςΩετ͔Βݕࡧ৚݅Λදࣔ͢Δ6*4FBSDI5PLFO͕࡞੒Մೳ w ෳ਺৚݅ͷݕࡧͷ6*ͷ࡞੒͕ศར

  47. .VMUJQMF4FMFDUJPO(FTUVSFT w ̎ຊࢦͰεϫΠϓ͢Δͱબ୒͕$FMMͷબ ୒͕Ͱ͖Δ w 5BCMF7JFXͱ$PMMFDUJPO7JFXڞʹ࣮૷Մ ೳ

  48. .VMUJQMF4FMFDUJPO(FTUVSFT w ࣮૷͸্هͷEFMFHBUFϝιουΛ࢖༻ w EJE4FMFDU΋ݺ͹ΕΔͨΊFEJUJOHঢ়ଶͷͱ͖ͷΈ.VMUJQMF4FMFDUJPOΛڐՄ͢Δඞཁ

  49. New6*JOJ04 w %BSLNPEF w 6*GPSJ04 w 'MFYJCMF6* w 4IFFU w

    6*4FBSDI$POUSPMMFS w .VMUJQMF4FMFDUJPO(FTUVSFT
  50. .PSF*OGPSNBUJPO w 8IBU`TOFXJOJ04BOE.BD%FTJHO w IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED w *NQMFNFOUJOH%BSL.PEFPOJ04 w IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED w

    .PEFSOJ[JOH:PVS6*JOJ04 w IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED