Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
札幌iPhone開発懇談会2020年11月資料
Search
notoroid
November 23, 2020
Programming
1
320
札幌iPhone開発懇談会2020年11月資料
iOS14で追加されたWidget/ウィジット設定ダイアログについての発表資料。
・ウィジット略史
・16ステップでできるウィジット設定ダイアログ
notoroid
November 23, 2020
Tweet
Share
More Decks by notoroid
See All by notoroid
WeatherKit iOS18 update - お天気の更新
notoroid
0
37
AppIntentsの用途 - AppleのGPT元年
notoroid
1
120
Privacy manifests - Appleと開発コミュニティ
notoroid
1
180
とっさのAutoLayout - Rewind autolayout
notoroid
0
71
UVC(USB video class)と マルチプラットフォーム - UVC support by Apple multiplatform
notoroid
0
280
SwiftUIむけに 整理された状態監視 Observation
notoroid
0
650
よせあつめSwift - Swift5.9
notoroid
1
620
Transferable - SwiftUI ドキュメントアプリ
notoroid
2
390
整理されたSwift言語仕様 - Swift 5.7 any/some
notoroid
1
960
Other Decks in Programming
See All in Programming
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
880
RubyLSPのマルチバイト文字対応
notfounds
0
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
1
110
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
Amazon Qを使ってIaCを触ろう!
maruto
0
400
subpath importsで始めるモック生活
10tera
0
300
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Visualization
eitanlees
145
15k
A Tale of Four Properties
chriscoyier
156
23k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Music & Morning Musume
bryan
46
6.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
What's in a price? How to price your products and services
michaelherold
243
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Transcript
ΟδοτઃఆμΠΞϩά 8JEHFU$POpHVSBUJPO$VTUPN*OUFOU
ࣗݾհ
ೳొཁ !OPUPSPJE w J04ΞϓϦ։ൃऀ w ߸͍Γ·͢ిࢉاը w !OPUPSPJE w !JSJNBTV
w ࠷ۙͷಈ w ϒϩά৽͠·ͨ͠
ॆిใࠂ͞Μ #BUUFSFDFJWFS w όοςϦʔϞχλʔ ϢʔςΟϦςΟʔ w ࠷େ ࣮ػ ϦϞʔτ
w ख࣋ͪͷJ1IPOF͔Βଞʹ͍࣋ͬͯΔ J1IPOF J1BEͳͲͷػثͷόοςϦʔঢ়ଶ֬ ೝՄೳ w ࣗʹ͋ΔJ1IPOFͷόοςϦʔঢ়ଶ֬ೝՄ ೳ
ॆిใࠂ͞Μ #BUUFSFDFJWFS w "QQMF8BUDIରԠ w $PNQMJDBUJPOTରԠ w ॆిྃ௨ w ॆిྃΛ͑ͯ͘ΕΔ௨ΛՃ
w ҎԼʹࢦఆ͢Δ͜ͱͰόοςϦʔ ΛέΞ͢Δ͜ͱ͕Մೳ w Կ͔ͱߴ͍J1IPOFΛ࣋ͪͤ͞Δͷʹ༗ ༻
ॆిใࠂ͞Μ #BUUFSFDFJWFS /FX ΟδοτʹରԠ͠·ͨ͠ J04ʙ 4NBMM .FEJVN
ॆిใࠂ͞Μ #BUUFSFDFJWFS ΟδοτઃఆΛՃ͠·ͨ͠ W
͢͜ͱ w Οδοτུ࢙ w 8JEHFU,JU8JEHFU$POpHVSBUJPO w $VTUPN*OUFOU
͞ͳ͍͜ͱ w 4XJGU6*Λͬͨ8JEHFU,JUͷදࣔ
w Οδοτུ࢙ w ΟδοτઃఆμΠΞϩά w ΟδοτઃఆμΠΞϩάͷ࡞εςοϓ w ·ͱΊ
Οδοτུ࢙
J04ͰΟδοτରԠ Ճ͞Ε·ͨ͠
ͦͦΟδοτͬͯԿ J04ͷΟδοτʹͭͳ͕ΔΟδοτͱ
ḪΔ͜ͱ ,POGBCVMBUPS :BIPP8JEHFU&OHJOF
ḪΔ͜ͱ ,POGBCVMBUPS :BIPP8JEHFU&OHJOF
:BIPP8JEHFU&OHJOF
:BIPP8JEHFU&OHJOF Ξφϩά࣌ܭ σδλϧ࣌ܭ ϛϡʔδοΫ ϓϨΠϠʔ 8Jpڧ όοςϦʔྔ Ϛοϓ ఱؾ ΰϛശ
ΧϨϯμʔ ΧϨϯμʔ
"QQMF %BTICPBSE
%BTICPBSE 04ᶠ Ξφϩά࣌ܭ ఱؾ $BMDVMBUPS ΧϨϯμʔ
%BTICPBSEΟδοτͷߏ w εΩϡϞʔϑΟζϜ w 8FC༝དྷͷٕज़ w 9.- w &$."4DSJQUY w
σʔλιʔε w γεςϜʹΞΫηεՄೳ w ωοτϫʔΫͷΞΫηε
ॳJ1IPOFͷϧοΫεϥΠΫʹӨڹ J1IPOF( 04ᶠΞϓϦ 04ᶠ%BTICPBSE Οδοτ J1PE
ॳJ1IPOFͷϧοΫεϥΠΫʹӨڹ J1IPOF( 04ᶠΞϓϦ 04ᶠ%BTICPBSE Οδοτ J1PE ˞΄΅049ͷػೳ͔Βͷ࣋ͪग़͕ͩ͠ɺ ɹ࣌ܭɺఱؾͳͲΟδοτͷӨڹ͕େ͖͍
Կ͕ݴ͍͍͔ͨͱ͍͏ͱ
J1IPOF্ཱͪ͛ॳ ϑΝʔεταʔυύʔςΟؚΊͯ ΟδοτతΞϓϦͱΞϓϦ͕ࠞࡏ
ͦͷޙɺΞϓϦࢢ্ཱ͕ͪΓͱڞʹ ΟδοτతΞϓϦ৹ࠪͰ ػೳෆͱΈͳ͞ΕΔΑ͏ʹ
ΞϓϦͷ֦ுػೳͱͯ͠ 5PEBZ&YUFOTJPO͕ొ
ΞϓϦͷ֦ுػೳͱͯ͠ 5PEBZ&YUFOTJPO͕ొ &YUFOTJPOٕज़ΛΊ͍͚ͨͩͷΤα
8JEHFU,JUൃද ϚϧνϓϥοτϑΥʔϜΤωϧΪʔޮΛߟྀ
8JEHFU,JUൃද ϚϧνϓϥοτϑΥʔϜΤωϧΪʔޮΛߟྀ 4XJGU6**OUFOUٕज़ΛΊ͍͚ͨͩͷΤα
8JEHFU,JU 8JEHFU$POpHVSBUJPO
8JEHFU$POpHVSBUJPO ΟδοτઃఆμΠΞϩά
Οδοτઃఆ ԡ͠Ͱϝχϡʔදࣔ ઃఆ߲Ұཡ બࢶΛλοϓՄೳ
Οδοτઃఆ ԡ͠Ͱϝχϡʔදࣔ ઃఆ߲Ұཡ બࢶΛλοϓՄೳ $VTUPN*OUFOU QBSBNFUFS QBSBNFUFS
4JSJɺ4JSJ4IPSUDVUͰ ಋೖ͞Ε͍ͯͨ$VTUPN*OUFOUΛ ΟδοτઃఆμΠΞϩάͰ༻
$VTUPN*OUFOU $VTUPN*OUFOU)BOEMFS $VTUPN*OUFOU /46TFS"DUJWJUZ J04J1BE"QQ 1BSBNFUFST 04ͷհ *OUFOU໊ *OUFOUҾ͖ͯ *OUFOUެ։
$VTUPN*OUFOU $VTUPN*OUFOU)BOEMFS $VTUPN*OUFOU 1BSBNFUFST 04ͷհ J04J1BE8JEHFU 8JEHFUʹ$VTUPN*OUFOUΛख͠ *OUFOU໊ *OUFOUҾ͖ͯ *OUFOUެ։
None
ΟδοτઃఆμΠΞϩάͷ εςοϓຖͷखॱ
αϯϓϧίʔυ
IUUQTHJUIVCDPNOPUPSPJE 8JEHFU$POpHVSBUJPO%FNP
ΟδοτઃఆμΠΞϩάͷલఏ J04J1BEΞϓϦͷϓϩδΣΫτ ΟδοτλʔήοτΛՃ͢Δ w ઃఆμΠΞϩά͖ Οδοτઃఆ༻ʹΠϯςϯτ֦ுΛՃ͢Δ
બࢶ༻ͷఆٛ
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" } } }
εςοϓͰऴΘΔ ΟδοτઃఆμΠΞϩά
̏ͭͷث "QQ 8JEHFU *OUFOU Λຬͨͤ
ΟδοτλʔήοτΛՃᶃ
ΟδοτλʔήοτΛՃᶄ
*OUFOUEFpOJUJPOΛઃఆ͢Δᶃ
*OUFOUEFpOJUJPOΛઃఆ͢Δᶄ
*OUFOUEFpOJUJPOΛઃఆ͢Δᶅ
*OUFOUEFpOJUJPOΛઃఆ͢Δᶆ
*OUFOUEFpOJUJPOΛઃఆ͢Δᶇ
*OUFOUEFpOJUJPOΛઃఆ͢Δᶈ
Οδοτઃఆ༻*OUFOUTΛՃ͢Δᶃ
Οδοτઃఆ༻*OUFOUTΛՃ͢Δᶄ
Οδοτઃఆ༻*OUFOUTΛՃ͢Δᶅ
4VQQPSUFE*OUFOUTΛઃఆ
ྻڍఆٛΛՃ
*OUFOU)BOEMFSΛஔ͖͑Δ
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()) } }
8JEHFU͔ΒઃఆΛ͏ᶃ
8JEHFU͔ΒઃఆΛ͏ᶄ
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("ͦͷଞ") } } }
ΑΓৄ͘͠Γ͍ͨํ IUUQTJSJNBTVDPNUBHXJEHFULJU
·ͱΊ w Οδοτػೳ͕։ൃऀͷΤαͱͯ͠࠶ొ͠·ͨ͠ w "QQMF͕ͬͯ΄͍ٕ͠ज़4XJGU6*$VTUPN*OUFOUTͰ͢ w $VTUPN*OUFOTΛऔΓѻ͏ͨΊʹ׳Ε͕ඞཁͰ͢ w ͨͩ͠8JEHFUΛ࡞Δػձࠓͷͱ͜Ζͳ͍Ͱ͢
IUUQTJSJNBTVDPN <13>#MPHਵ࣌ߘத