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
27
AppIntentsの用途 - AppleのGPT元年
notoroid
1
110
Privacy manifests - Appleと開発コミュニティ
notoroid
1
160
とっさのAutoLayout - Rewind autolayout
notoroid
0
58
UVC(USB video class)と マルチプラットフォーム - UVC support by Apple multiplatform
notoroid
0
260
SwiftUIむけに 整理された状態監視 Observation
notoroid
0
620
よせあつめSwift - Swift5.9
notoroid
1
610
Transferable - SwiftUI ドキュメントアプリ
notoroid
2
370
整理されたSwift言語仕様 - Swift 5.7 any/some
notoroid
1
940
Other Decks in Programming
See All in Programming
Kubernetes上でOracle_Databaseの運用を楽にするOraOperatorの紹介
nnaka2992
0
170
ActiveRecordの力でDBのメタデータを迅速に解析する
lnit
5
2k
データマイグレーションの成功戦略~サービスリニューアルで失敗しないための実践ガイド~
tkzwtks
8
850
Hi, have you met Kotlin Multiplatform? | DevFest Vienna 2024
prof18
0
230
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
0
440
sqlcを利用してsqlに型付けを
kamiyam
0
250
rtcamp 10 (vk-illuminati)
yumcyawiz
1
210
今日で分かる!カスタムコップの作り方
krpk1900
2
270
perl for shell, awk and sed programmers
mackee
2
1k
GrafanaのHTTP API を眺めてみよう
rinchoku
0
470
/←このスケジュール表に立ち向かう フロントエンド開発戦略 / A front-end development strategy to tackle a single-slash schedule.
nrslib
1
430
Повторное использование кода в ML: почему ML-пайплайны могут помочь?
lamodatech
0
400
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Done Done
chrislema
181
16k
Six Lessons from altMBA
skipperchong
26
3.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
40
2.1k
Designing for Performance
lara
604
68k
A better future with KSS
kneath
237
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4.1k
Unsuck your backbone
ammeep
668
57k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.3k
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ਵ࣌ߘத