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
310
札幌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
33
AppIntentsの用途 - AppleのGPT元年
notoroid
1
110
Privacy manifests - Appleと開発コミュニティ
notoroid
1
170
とっさのAutoLayout - Rewind autolayout
notoroid
0
59
UVC(USB video class)と マルチプラットフォーム - UVC support by Apple multiplatform
notoroid
0
270
SwiftUIむけに 整理された状態監視 Observation
notoroid
0
630
よせあつめSwift - Swift5.9
notoroid
1
610
Transferable - SwiftUI ドキュメントアプリ
notoroid
2
380
整理されたSwift言語仕様 - Swift 5.7 any/some
notoroid
1
940
Other Decks in Programming
See All in Programming
hotwire_or_react
harunatsujita
6
2.5k
Vue.js学習の振り返り
hiro_xre
2
130
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
510
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
3
1.2k
Mercari AI/LLM Hackathon TeamBの発表資料
imaikosuke
0
200
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
520
Folding Cheat Sheet #8
philipschwarz
PRO
0
160
gopls を改造したら開発生産性が高まった
satorunooshie
8
220
Scan with Decoupled Look-back and Onesweep Radix Sort
shocker_0x15
0
160
Prompt Engineering for Developers @ AWS Community Day Adria 2024
slobodan
0
110
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
330
EventSourcingの理想と現実
wenas
5
1.9k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
5
140
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Measuring & Analyzing Core Web Vitals
bluesmoon
0
27
The Cult of Friendly URLs
andyhume
78
6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
59k
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ਵ࣌ߘத