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

札幌iPhone開発懇談会2020年11月資料

0fb0b8c6eecbc8e0a3981501f6a6fea6?s=47 notoroid
November 23, 2020

 札幌iPhone開発懇談会2020年11月資料

iOS14で追加されたWidget/ウィジット設定ダイアログについての発表資料。

・ウィジット略史
・16ステップでできるウィジット設定ダイアログ

0fb0b8c6eecbc8e0a3981501f6a6fea6?s=128

notoroid

November 23, 2020
Tweet

Transcript

  1. ΢ΟδοτઃఆμΠΞϩά 8JEHFU$POpHVSBUJPO$VTUPN*OUFOU

  2. ࣗݾ঺հ

  3. ೳొཁ !OPUPSPJE w J04ΞϓϦ։ൃऀ w ԰߸͍Γ·͢ిࢉاը w !OPUPSPJE w !JSJNBTV

    w ࠷ۙͷಈ޲ w ϒϩά࡮৽͠·ͨ͠
  4. ॆిใࠂ͞Μ #BUUFSFDFJWFS w όοςϦʔϞχλʔ ϢʔςΟϦςΟʔ  w ࠷େ୆ ࣮ػ ϦϞʔτ୆

     w ख࣋ͪͷJ1IPOF͔Βଞʹ͍࣋ͬͯΔ J1IPOF J1BEͳͲͷػثͷόοςϦʔঢ়ଶ֬ ೝՄೳ w ࣗ୐ʹ͋ΔJ1IPOFͷόοςϦʔঢ়ଶ֬ೝՄ ೳ
  5. ॆిใࠂ͞Μ #BUUFSFDFJWFS w "QQMF8BUDIରԠ w $PNQMJDBUJPOTରԠ w ॆి׬ྃ௨஌ w ॆి׬ྃΛ఻͑ͯ͘ΕΔ௨஌Λ௥Ճ

    w ҎԼʹࢦఆ͢Δ͜ͱͰόοςϦʔ ΛέΞ͢Δ͜ͱ͕Մೳ w Կ͔ͱߴ͍J1IPOFΛ௕࣋ͪͤ͞Δͷʹ༗ ༻
  6. ॆిใࠂ͞Μ #BUUFSFDFJWFS /FX ΢ΟδοτʹରԠ͠·ͨ͠ J04ʙ 4NBMM .FEJVN

  7. ॆిใࠂ͞Μ #BUUFSFDFJWFS ΢ΟδοτઃఆΛ௥Ճ͠·ͨ͠ W

  8. ࿩͢͜ͱ w ΢Οδοτུ࢙ w 8JEHFU,JU8JEHFU$POpHVSBUJPO w $VTUPN*OUFOU

  9. ࿩͞ͳ͍͜ͱ w 4XJGU6*Λ࢖ͬͨ8JEHFU,JUͷදࣔ

  10. ୊໨ w ΢Οδοτུ࢙ w ΢ΟδοτઃఆμΠΞϩά w ΢ΟδοτઃఆμΠΞϩάͷ࡞੒εςοϓ w ·ͱΊ

  11. ΢Οδοτུ࢙

  12. J04Ͱ΢ΟδοτରԠ ௥Ճ͞Ε·ͨ͠

  13. ͦ΋ͦ΋΢ΟδοτͬͯԿ J04ͷ΢Οδοτʹͭͳ͕Δ΢Οδοτͱ͸

  14. ḪΔ͜ͱ೥ ,POGBCVMBUPS :BIPP8JEHFU&OHJOF

  15. ḪΔ͜ͱ೥ ,POGBCVMBUPS :BIPP8JEHFU&OHJOF

  16. :BIPP8JEHFU&OHJOF

  17. :BIPP8JEHFU&OHJOF Ξφϩά࣌ܭ σδλϧ࣌ܭ ϛϡʔδοΫ ϓϨΠϠʔ 8Jpڧ౓ όοςϦʔ࢒ྔ Ϛοϓ ఱؾ ΰϛശ

    ΧϨϯμʔ ΧϨϯμʔ
  18. "QQMF   %BTICPBSE

  19. %BTICPBSE 04ᶠ Ξφϩά࣌ܭ ఱؾ $BMDVMBUPS ΧϨϯμʔ

  20. %BTICPBSE΢Οδοτͷߏ੒ w εΩϡϞʔϑΟζϜ w 8FC༝དྷͷٕज़ w 9.- w &$."4DSJQUY w

    σʔλιʔε w γεςϜʹ௚઀ΞΫηεՄೳ w ωοτϫʔΫ΁ͷΞΫηε
  21. ॳ୅J1IPOFͷϧοΫεϥΠΫʹӨڹ J1IPOF( 04ᶠΞϓϦ 04ᶠ%BTICPBSE ΢Οδοτ J1PE

  22. ॳ୅J1IPOFͷϧοΫεϥΠΫʹӨڹ J1IPOF( 04ᶠΞϓϦ 04ᶠ%BTICPBSE ΢Οδοτ J1PE ˞΄΅049ͷػೳ͔Βͷ࣋ͪग़͕ͩ͠ɺ ɹ࣌ܭɺఱؾͳͲ͸΢ΟδοτͷӨڹ͕େ͖͍

  23. Կ͕ݴ͍͍͔ͨͱ͍͏ͱ

  24. J1IPOF্ཱͪ͛౰ॳ͸ ϑΝʔεταʔυύʔςΟؚΊͯ ΢ΟδοτతΞϓϦͱΞϓϦ͕ࠞࡏ

  25. ͦͷޙɺΞϓϦࢢ৔্ཱ͕ͪΓͱڞʹ ΢ΟδοτతΞϓϦ͸৹ࠪͰ ػೳෆ଍ͱΈͳ͞ΕΔΑ͏ʹ

  26. ೥ΞϓϦͷ֦ுػೳͱͯ͠ 5PEBZ&YUFOTJPO͕ొ৔

  27. ೥ΞϓϦͷ֦ுػೳͱͯ͠ 5PEBZ&YUFOTJPO͕ొ৔ &YUFOTJPOٕज़Λ޿Ί͍͚ͨͩͷΤα

  28. ೥8JEHFU,JUൃද ϚϧνϓϥοτϑΥʔϜΤωϧΪʔޮ཰Λߟྀ

  29. ೥8JEHFU,JUൃද ϚϧνϓϥοτϑΥʔϜΤωϧΪʔޮ཰Λߟྀ 4XJGU6**OUFOUٕज़Λ޿Ί͍͚ͨͩͷΤα

  30. 8JEHFU,JU 8JEHFU$POpHVSBUJPO

  31. 8JEHFU$POpHVSBUJPO ΢ΟδοτઃఆμΠΞϩά 

  32. ΢Οδοτઃఆ ௕ԡ͠Ͱϝχϡʔදࣔ ઃఆ߲໨Ұཡ બ୒ࢶΛλοϓՄೳ

  33. ΢Οδοτઃఆ ௕ԡ͠Ͱϝχϡʔදࣔ ઃఆ߲໨Ұཡ બ୒ࢶΛλοϓՄೳ $VTUPN*OUFOU QBSBNFUFS QBSBNFUFS

  34. 4JSJɺ4JSJ4IPSUDVUͰ ಋೖ͞Ε͍ͯͨ$VTUPN*OUFOUΛ ΢ΟδοτઃఆμΠΞϩάͰ࢖༻

  35. $VTUPN*OUFOU $VTUPN*OUFOU)BOEMFS $VTUPN*OUFOU /46TFS"DUJWJUZ J04J1BE"QQ 1BSBNFUFST 04ͷ஥հ *OUFOU໊ *OUFOUҾ͖౰ͯ *OUFOUެ։

  36. $VTUPN*OUFOU $VTUPN*OUFOU)BOEMFS $VTUPN*OUFOU 1BSBNFUFST 04ͷ஥հ J04J1BE8JEHFU 8JEHFUʹ$VTUPN*OUFOUΛख౉͠ *OUFOU໊ *OUFOUҾ͖౰ͯ *OUFOUެ։

  37. None
  38. ΢ΟδοτઃఆμΠΞϩάͷ εςοϓຖͷखॱ

  39. αϯϓϧίʔυ

  40. IUUQTHJUIVCDPNOPUPSPJE 8JEHFU$POpHVSBUJPO%FNP

  41. ΢ΟδοτઃఆμΠΞϩάͷલఏ J04J1BEΞϓϦͷϓϩδΣΫτ ΢ΟδοτλʔήοτΛ௥Ճ͢Δ w ઃఆμΠΞϩά෇͖ ΢Οδοτઃఆ༻ʹΠϯςϯτ֦ுΛ௥Ճ͢Δ

  42. બ୒ࢶ༻ͷఆٛ

  43. enum DisplayTypeDefinition: String { case slot234 = "Slot2-3-4" case slot1

    = "Slot1" case slot2 = "Slot2" case slot3 = "Slot3" case slot4 = "Slot4" func identifier() -> String { self.rawValue } func displayName() -> String { switch self { case .slot234: return "Stack(Slot2,3,4)" case .slot1: return "Slot1" case .slot2: return "Slot2" case .slot3: return "Slot3" case .slot4: return "Slot4" } } }
  44. εςοϓͰऴΘΔ ΢ΟδοτઃఆμΠΞϩά

  45. ̏ͭͷث "QQ 8JEHFU *OUFOU Λຬͨͤ͹׬੒

  46. ΢ΟδοτλʔήοτΛ௥Ճᶃ 

  47. ΢ΟδοτλʔήοτΛ௥Ճᶄ 

  48. *OUFOUEFpOJUJPOΛઃఆ͢Δᶃ 

  49. *OUFOUEFpOJUJPOΛઃఆ͢Δᶄ 

  50. *OUFOUEFpOJUJPOΛઃఆ͢Δᶅ 

  51. *OUFOUEFpOJUJPOΛઃఆ͢Δᶆ 

  52. *OUFOUEFpOJUJPOΛઃఆ͢Δᶇ 

  53. *OUFOUEFpOJUJPOΛઃఆ͢Δᶈ 

  54. ΢Οδοτઃఆ༻*OUFOUTΛ௥Ճ͢Δᶃ 

  55. ΢Οδοτઃఆ༻*OUFOUTΛ௥Ճ͢Δᶄ 

  56. ΢Οδοτઃఆ༻*OUFOUTΛ௥Ճ͢Δᶅ 

  57. 4VQQPSUFE*OUFOUTΛઃఆ 

  58. ྻڍఆٛΛ௥Ճ 

  59. *OUFOU)BOEMFSΛஔ͖׵͑Δ 

  60. class IntentHandler: INExtension, ConfigurationIntentHandling { func provideDisplayTypeOptionsCollection(for intent: ConfigurationIntent, with

    completion: @escaping (INObjectCollection<DisplayType>?, Error?) -> Void) { let displayTypeDefinitions: [DisplayTypeDefinition] = [ .slot234, .slot1, .slot2, .slot3, .slot4 ] let displayType = displayTypeDefinitions.map { (displayTypeDefinition) -> DisplayType in DisplayType(identifier: displayTypeDefinition.identifier(), display: displayTypeDefinition.displayName()) } completion(INObjectCollection(items: displayType), nil) } func defaultDisplayType(for intent: ConfigurationIntent) -> DisplayType? { return DisplayType(identifier: DisplayTypeDefinition.slot234.identifier(), display: DisplayTypeDefinition.slot234.displayName()) } }
  61. 8JEHFU͔ΒઃఆΛ࢖͏ᶃ 

  62. 8JEHFU͔ΒઃఆΛ࢖͏ᶄ 

  63. struct GraphEntryView : View { var entry: Provider.Entry func displayType()

    -> DisplayTypeDefinition { let defaultValue = DisplayTypeDefinition.slot234 let rawValue = entry.configuration.displayType?.identifier ?? defaultValue.identifier() return DisplayTypeDefinition(rawValue: rawValue) ?? defaultValue } var body: some View { switch self.displayType() { case .slot234: return Text("ελοΫදࣔ") default: return Text("ͦͷଞ") } } }
  64. ΑΓৄ͘͠஌Γ͍ͨํ͸ IUUQTJSJNBTVDPNUBHXJEHFULJU

  65. ·ͱΊ w ΢Οδοτػೳ͕։ൃऀͷΤαͱͯ͠࠶ొ৔͠·ͨ͠ w "QQMF͕࢖ͬͯ΄͍ٕ͠ज़͸4XJGU6*$VTUPN*OUFOUTͰ͢ w $VTUPN*OUFOTΛऔΓѻ͏ͨΊʹ͸׳Ε͕ඞཁͰ͢ w ͨͩ͠8JEHFUΛ࡞Δػձ͸ࠓͷͱ͜Ζͳ͍Ͱ͢

  66. IUUQTJSJNBTVDPN <13>#MPHਵ࣌౤ߘத