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
SwiftUIで作りながら学ぶアニメーション インジケーター編
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ryo Tsuzukihashi
February 12, 2020
Programming
0
660
SwiftUIで作りながら学ぶアニメーション インジケーター編
SwiftUIで作りながら学ぶアニメーション インジケーター編
Qiitaに詳しい記事あげます。
Ryo Tsuzukihashi
February 12, 2020
Tweet
Share
More Decks by Ryo Tsuzukihashi
See All by Ryo Tsuzukihashi
AlarmKitで実現する 新時代のシステム通知
tsuzuki817
0
5.8k
SwiftUI Transaction を徹底活用!ZOZOTOWN UI開発での活用事例
tsuzuki817
1
3k
レビューを増やしつつ 高評価維持するテクニック
tsuzuki817
3
1.2k
二次元コードを読み取りやすくするために 画面を強制的に明るくするのは もうやめにしませんか?👀
tsuzuki817
0
480
動画だけじゃない!iOS 15のピクチャ・イン・ピクチャを使って好きなUIを表示させよう!
tsuzuki817
3
5.8k
iOS 16からのロック画面Widget争奪戦に備える
tsuzuki817
2
1.1k
Complications and widgets: Reloadedの要約
tsuzuki817
1
1.4k
Speech framework tips
tsuzuki817
1
2.9k
Build complication in SwiftUI の要約
tsuzuki817
0
750
Other Decks in Programming
See All in Programming
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
900
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
170
Claude Code Skill入門
mayahoney
0
270
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
400
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
Ruby x Terminal
a_matsuda
7
590
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
380
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
330
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
160
Understanding Apache Lucene - More than just full-text search
spinscale
0
100
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
280
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
390
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
190
GraphQLとの向き合い方2022年版
quramy
50
14k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
980
The Cult of Friendly URLs
andyhume
79
6.8k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
310
The Spectacular Lies of Maps
axbom
PRO
1
620
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Balancing Empowerment & Direction
lara
5
940
Transcript
4XJGU6*㗧Ъ㘊㗪㗌㘉䕎㗶㘕㘾㙔㖽㘪㙚㙦 㘗㙦㘫㘤㖽㘲㖽ᇜ QPUBUPUJQT !UTV[VLJ
ࣗݾհ w ϠϑʔJ04ΤϯδχΞ w ೖࣾͷ৽ଔ w 1BZ1BZϑϦϚJ04 w #POpSFJ04ӡӦ w
झຯݸਓΞϓϦυοτֆ ॳొஃͰۓுத
ΰʔϧ
࡞Ζ͏ struct ContentView: View { var body: some View {
Circle() .trim(from: 0, to: 0.6) .stroke(Color.green, lineWidth: 8) .frame(width: 48, height: 48) } }
ʁ
StrokeStyle( lineWidth: CGFloat, lineCap: CGLineCap, lineJoin: CGLineJoin, miterLimit: CGFloat, dash:
[CGFloat], dashPhase: CGFloat ) StrokeStyle
lineCap . round . square . butt
dash [ઢͷ͞, ۭനͷ͞, 2൪ͷઢͷ͞, 2൪ͷۭനͷ͞, ...] ഁઢͷܗঢ়ΛྻͰࢦఆ͠·͢ɻ .stroke(Color.green, style: StrokeStyle(
lineWidth: 8, lineCap: .round, dash: [0.1, 16]))
rotationEffect(_:anchor:) func rotationEffect( _ angle: Angle, anchor: UnitPoint = .center)
-> some View Circle() . . . .rotationEffect( Angle(degrees: self.isAnimation ? 360 : 0) ) @State var isAnimation = false
.onAppear() { withAnimation( Animation .linear(duration: 1) .repeatForever(autoreverses: false)) { self.isAnimation.toggle()
} } @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) public func withAnimation<Result>( _ animation: Animation? = .default, _ body: () throws -> Result) rethrows -> Result XJUI"OJNBUJPO @@
default linear easeIn easeOut easeInOut
άϦϯϐʔεΛଔۀ
AngularGradient(gradient: Gradient(colors: [.gray, .white]) άϥσʔγϣϯ Gradient(colors: [.gray, .white]) άϥσʔγϣϯ͍ͤͨ͞৭ͷྻͭҎ্⭕ w-JOFBS(SBEJFOUઢܗάϥσʔγϣϯ
w"OHVMBS(SBEJFOUԁܗάϥσʔγϣϯ w3BEJBM(SBEJFOU์ঢ়άϥσʔγϣϯ
None
StrokeStyle( lineWidth: 8, lineCap: .round, dash: [0.1, 16], dashPhase: 8)
) ഁઢͷ։࢝ҐஔΛͣΒ͢ʂ
Circle() .trim(from: 0, to: 0.6) .stroke( AngularGradient( gradient: Gradient(colors: [.gray,
.white]), center: .center), style: StrokeStyle( lineWidth: 8, lineCap: .round, dash: [0.1, 16], dashPhase: 8)) .frame(width: 48, height: 48) .rotationEffect( Angle(degrees: self.isAnimation ? 360 : 0)) .onAppear() { withAnimation( Animation .linear(duration: 1) .repeatForever(autoreverses: false)) { self.isAnimation.toggle() } }
None
None
4XJGU6*ͰΦϦδφϧΞχϝʔγϣϯΛͬͯ ΞϓϦΛϦονʹʂ