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
700
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
2
1k
二次元コードを読み取りやすくするために 画面を強制的に明るくするのは もうやめにしませんか?👀
tsuzuki817
0
410
動画だけじゃない!iOS 15のピクチャ・イン・ピクチャを使って好きなUIを表示させよう!
tsuzuki817
3
4.5k
iOS 16からのロック画面Widget争奪戦に備える
tsuzuki817
2
1k
Complications and widgets: Reloadedの要約
tsuzuki817
1
1.2k
Speech framework tips
tsuzuki817
1
2.6k
SwiftUI で Neumorphism!!!
tsuzuki817
2
1.9k
SwiftUIで作りながら学ぶアニメーション インジケーター編
tsuzuki817
0
580
Other Decks in Programming
See All in Programming
今から始めるCursor / Windsurf / Cline
kengo_hayano
0
110
安全に倒し切るリリースをするために:15年来レガシーシステムのフルリプレイス挑戦記
sakuraikotone
5
2.3k
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
820
アーキテクトと美学 / Architecture and Aesthetics
nrslib
12
3.1k
複数ドメインに散らばってしまった画像…! 運用中のPHPアプリに後からCDNを導入する…!
suguruooki
0
430
Go1.24 go vetとtestsアナライザ
kuro_kurorrr
2
470
プログラミング教育のコスパの話
superkinoko
0
120
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
350
PHPUnit 高速化テクニック / PHPUnit Speedup Techniques
pinkumohikan
1
1.2k
Compose Navigation実装の見通しを良くする
hiroaki404
0
180
보일러플레이트 코드가 진짜 나쁜 건가요?
gaeun5744
0
370
ローコードサービスの進化のためのモノレポ移行
taro28
1
330
Featured
See All Featured
KATA
mclloyd
29
14k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
500
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Practical Orchestrator
shlominoach
187
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
25k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Rails Girls Zürich Keynote
gr2m
94
13k
Testing 201, or: Great Expectations
jmmastey
42
7.4k
Code Review Best Practice
trishagee
67
18k
Agile that works and the tools we love
rasmusluckow
328
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
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