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
Build complication in SwiftUI の要約
Search
Ryo Tsuzukihashi
July 09, 2020
Programming
0
680
Build complication in SwiftUI の要約
Build complication in SwiftUIの要約
WWDC20セッション要約会
Ryo Tsuzukihashi
July 09, 2020
Tweet
Share
More Decks by Ryo Tsuzukihashi
See All by Ryo Tsuzukihashi
二次元コードを読み取りやすくするために 画面を強制的に明るくするのは もうやめにしませんか?👀
tsuzuki817
0
390
動画だけじゃない!iOS 15のピクチャ・イン・ピクチャを使って好きなUIを表示させよう!
tsuzuki817
3
4.2k
iOS 16からのロック画面Widget争奪戦に備える
tsuzuki817
2
1k
Complications and widgets: Reloadedの要約
tsuzuki817
1
1.1k
Speech framework tips
tsuzuki817
1
2.5k
SwiftUI で Neumorphism!!!
tsuzuki817
2
1.8k
SwiftUIで作りながら学ぶアニメーション インジケーター編
tsuzuki817
0
560
Other Decks in Programming
See All in Programming
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
400
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
280
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
200
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
180
AHC041解説
terryu16
0
380
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
700
快速入門可觀測性
blueswen
0
500
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
1k
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
521
39k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Scaling GitHub
holman
459
140k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
A Tale of Four Properties
chriscoyier
157
23k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Transcript
!UTV[VLJ 3ZP5TV[VLJIBTIJ #VJMEDPNQMJDBUJPOJO4XJGU6* ͷཁ 88%$ηογϣϯཁձ
͓ॻ͖ NJO w ࣗݾհ w ⚠ҙࣄ߲⚠ w ίϯϓϦέʔγϣϯͱʁ w $PNQMJDBUJPOY4XJGU6*
w $PNQMJDBUJPO5FNQMBUF w ϓϨϏϡʔ w Τϥʔ Ҿ༻IUUQTTVQQPSUBQQMFDPNKBKQHVJEFXBUDIBQEFCXBUDIPT
ࣗݾհ w :BIPP+"1"/ w 1BZ1BZϑϦϚJ04ΞϓϦ w 5XJUUFS !UTV[VLJ w
ݸਓΞϓϦ։ൃ͕झຯ ࠷ۙʮ4LZ$PEFʯͱ͍͏ΞϓϦ͕όζΓ w ͖ͳXBUDIGBDF ΠϯϑΥάϥϑϞδϡϥʔ
⚠ҙࣄ߲⚠ w ։ൃڥ 9DPEFCFUB XBUDI04CFUB w γϛϡϨʔλͰಈ࡞֬ೝ ࣮ػͩͱίϯϓϦέʔγϣϯ͕ਖ਼͘͠දࣔ͞Εͳ͔ͬͨ w ͍ΖΜͳ͕͠ΒΈͰ࣮ࡍʹಈ͔͍ͯ͠ΔεΫγϣ͕ແ͍Ͱ͢
ޱ಄ͷઆ໌ؤுΓ·͢ʂ
ίϯϓϦέʔγϣϯͱʁ
ίϯϓϦέʔγϣϯͱʁ w ΞϓϦʹؔ͢ΔλΠϜϦʔͰؔ࿈ੑͷߴ͍ใΛΥονϑΣΠεʹදࣔ Ҿ༻IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPODMPDLLJU
$PNQMJDBUJPOY4XJGU6* w ίϯϓϦέʔγϣϯΛ4XJGU6*Ͱ࡞ΕΔΑ͏ʹͳͬͨ w ϓϨϏϡʔͷػೳ͕ڧ͍ w 4XJGU6*ͷԸܙΛड͚ΕΔ
GraphicCorner ▪CLKComplicationTemplateGraphicCornerCircularView ▪CLKComplicationTemplateGraphicCornerGaugeView ▪CLKComplicationTemplateGraphicCornerTextView GraphicCircular ▪CLKComplicationTemplateGraphicCircularView ▪CLKComplicationTemplateGraphicCircularStackViewT ext ▪CLKComplicationTemplateGraphicCircularClosedGaug eView
▪CLKComplicationTemplateGraphicCircularOpenGauge View GraphicRectangular ▪CLKComplicationTemplateGraphicRectangularFullVie w ▪CLKComplicationTemplateGraphicRectangularLargeVi ew ▪CLKComplicationTemplateGraphicRectangularTextGa ugeView ▪CLKComplicationTemplateGraphicRectangularStandar dBodyView ExtraLargeCircular ▪CLKComplicationTemplateGraphicExtraLargeCircular View ▪CLKComplicationTemplateGraphicExtraLargeCircular StackViewText ▪CLKComplicationTemplateGraphicExtraLargeCircular ClosedGaugeView ▪CLKComplicationTemplateGraphicExtraLargeCircular OpenGaugeView $PNQMJDBUJPO5FNQMBUF ߹ܭݸՃ
1SFWJFX దͳ7JFXΛ࡞Δ import SwiftUI struct SampleGraphicRectangular: View { @State var
gaugeValue: CGFloat = 3 var body: some View { VStack { Text("SwiftѪձ") Gauge(value: gaugeValue, in: 1...15) { Image(systemName: "drop.fill") .foregroundColor(.green) } currentValueLabel: { Text("\(gaugeValue, specifier: "%.1f")") } .gaugeStyle(LinearGaugeStyle( tint: Gradient(colors: [.orange, .yellow, .green, .blue, .purple]) )) } } }
1SFWJFX ઌ΄ͲͷViewΛwatchOSͷίϯϓϦέʔγϣϯͱͯ͠ϓϨϏϡʔ w $-,$PNQMJDBUJPOςϯϓϨʔτ4XJGU6*ͷ7JFXͦͷͷͰͳ͍ͷͰɺ୯ ମͰϓϨϏϡʔ͢Δ͜ͱ͕Ͱ͖ͳ͍ CLKComplicationTemplateͱpreviewContext Ͱղܾʂ
1SFWJFX w $MPDL,JUͱ4XJGU6*ΛJNQPSU w $PNQMJDBUJPO5FNQMBUFɺͦΕͧΕͷXBUDIGBDFͰදࣔ FY$-,$PNQMJDBUJPO5FNQMBUF(SBQIJD$JSDVMBS7JFX ˠΠϯϑΥάϥϑϞδϡϥʔ
struct SampleGraphicRectangular_Previews: PreviewProvider { static var previews: some View {
Group { CLKComplicationTemplateGraphicCornerCircularView(SampleGraphicRectangular()) .previewContext() CLKComplicationTemplateGraphicCircularView(SampleGraphicRectangular()) .previewContext() CLKComplicationTemplateGraphicRectangularFullView(SampleGraphicRectangular()) .previewContext() CLKComplicationTemplateGraphicExtraLargeCircularView(SampleGraphicRectangular ()) .previewContext() } } }
֤1SFWJFXͷදࣔ 1SFWJFX
1SFWJFX GBDFDPMPS w XBUDIGBDFΛςʔϚΧϥʔΛม͑Δ͜ͱ͕Ͱ͖Δ w ϓϨϏϡʔͰ؆୯ʹ֬ೝͰ͖·͢ w QSFWJFX$POUFYU GBDF$PMPSHSFFO
1SFWJFX $PNQMJDBUJPO3FOEFSJOH.PEF w XBUDIGBDFͷGBDF$PMPSʹΑͬͯίϯϓϦέʔγϣϯͷݟͨΛมߋ͍ͨ͠ ߹ʹҎԼͷΑ͏ʹDPNQMJDBUJPOͷ3FOEFSJOH.PEF͕ڥม͔ΒऔΕ ·͢ͷͰͦΕΛར༻͢Δ͜ͱͰରԠͰ͖·͢ʂ @Environment(\.complicationRenderingMode) var mode FOVN$PNQMJDBUJPO3FOEFSJOH.PEF
DBTFGVMM$PMPS DBTFUJOUFE
Τϥʔ ৽͘͠Ճ͞ΕͨศརͳΤϥʔ w $PNQMJDBUJPO$POUSPMMFSͷHFU$VSSFOU5JNFMJOF&OUSZʢʣ $PNQMJDBUJPOGBNJMZͱҟͳΔλΠϓͷ5FNQMBUF͕બ͞Ε͍ͯͨ߹ %BUBIBOEMFSDBMMFEXJUIJODPNQBUJCMFUFNQMBUFGPSDPNQMJDBUJPOGBNJMZ &YQFDUFEUFNQMBUFGPS$-,$PNQMJDBUJPO'BNJMZ(SBQIJD$JSDVMBS CVU SFDFJWFEPOFGPS$-,$PNQMJDBUJPO'BNJMZ(SBQIJD$PSOFS