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
670
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
360
動画だけじゃない!iOS 15のピクチャ・イン・ピクチャを使って好きなUIを表示させよう!
tsuzuki817
3
3.9k
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
550
Other Decks in Programming
See All in Programming
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
cmp.Or に感動した
otakakot
2
150
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
最新TCAキャッチアップ
0si43
0
140
Amazon Qを使ってIaCを触ろう!
maruto
0
400
Contemporary Test Cases
maaretp
0
140
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Featured
See All Featured
Side Projects
sachag
452
42k
Typedesign – Prime Four
hannesfritz
40
2.4k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Docker and Python
trallard
40
3.1k
Unsuck your backbone
ammeep
668
57k
A Tale of Four Properties
chriscoyier
156
23k
Speed Design
sergeychernyshev
25
620
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Scaling GitHub
holman
458
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
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