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
How to release apps faster with SwiftUI
Search
Akio Itaya
September 17, 2021
Programming
5
4.4k
How to release apps faster with SwiftUI
iOSDC JAPAN 2021
Akio Itaya
September 17, 2021
Tweet
Share
More Decks by Akio Itaya
See All by Akio Itaya
How to build visionOS apps using Windows
akkeylab
0
120
How to build visionOS apps using Persona
akkeylab
1
210
Summary - Introducing enterprise APls for visionOS
akkeylab
0
420
Apple Vision Pro trial session
akkeylab
0
240
How to support Privacy Manifest
akkeylab
0
370
Let's make it compatible with visionOS!
akkeylab
0
220
Let's Join the Android community!
akkeylab
0
140
顔写真メイクアップアプリの開発におけるプライバシー保護とコスト削減のための手法
akkeylab
1
380
How to hide the key
akkeylab
0
300
Other Decks in Programming
See All in Programming
MCP with Cloudflare Workers
yusukebe
2
220
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
530
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
Refactor your code - refactor yourself
xosofox
1
260
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
920
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
layerx_20241129.pdf
kyoheig3
2
290
14 Years of iOS: Lessons and Key Points
seyfoyun
1
770
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
The Language of Interfaces
destraynor
154
24k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Rails Girls Zürich Keynote
gr2m
94
13k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
KATA
mclloyd
29
14k
Transcript
AkkeyLab / AKIO ITAYA ࣮ϓϩμΫτΛԻϦϦʔεͨ͠🚀 WED, Inc. SwiftUIͰ 1
ࣗݾհ 2
ࣗݾհ ໊લɿAKIO ITAYAɹ/ɹAKKEY झຯɿۭؒσβΠϯ ׆ಈɿ@AkkeyLab ̧̥ɿγϧόʔˍTγϟπεϙϯαʔ ̧̥ɿݪߘ̎ίϯςϯπ߹ܭ̍̎ϖʔδ
WED, Inc. ݩ Cyberagent, Inc. 3
ࣗݾհ ໊લɿAKIO ITAYAɹ/ɹAKKEY झຯɿۭؒσβΠϯ ׆ಈɿ@AkkeyLab ̧̥ɿγϧόʔˍTγϟπεϙϯαʔ ̧̥ɿݪߘ̎ίϯςϯπ߹ܭ̍̎ϖʔδ
WED, Inc. ݩ Cyberagent, Inc. 4
ࣗݾհ ໊લɿAKIO ITAYAɹ/ɹAKKEY झຯɿۭؒσβΠϯ ׆ಈɿ@AkkeyLab ̧̥ɿγϧόʔˍTγϟπεϙϯαʔ ̧̥ɿݪߘ̎ίϯςϯπ߹ܭ̍̎ϖʔδ
WED, Inc. ݩ Cyberagent, Inc. 5
ࣗݾհ ໊લɿAKIO ITAYAɹ/ɹAKKEY झຯɿۭؒσβΠϯ ׆ಈɿ@AkkeyLab ̧̥ɿγϧόʔˍTγϟπεϙϯαʔ ̧̥ɿݪߘ̎ίϯςϯπ߹ܭ̍̎ϖʔδ
WED, Inc. ݩ Cyberagent, Inc. 6
ࣗݾհ Check Novelty Box!! 1SPEVDFECZ"LLFZ-BC 7
ࣗݾհ ໊લɿAKIO ITAYAɹ/ɹAKKEY झຯɿۭؒσβΠϯ ׆ಈɿ@AkkeyLab ̧̥ɿγϧόʔˍTγϟπεϙϯαʔ ̧̥ɿݪߘ̎ίϯςϯπ߹ܭ̍̎ϖʔδ
WED, Inc. ݩ Cyberagent, Inc. 8
Agenda 1. SwiftUI Ͱ։ൃͨ͠ΞϓϦ 2. SwiftUI ࠾༻ཧ༝ 3. SwiftUI ϨΠΞτςΫχοΫ
4. UIKit ͷුؾ 5. SwiftUI ະରԠϥΠϒϥϦ 9
SwiftUI Ͱ։ൃͨ͠ΞϓϦ 10
د͕͙ͦ͢ʹɻ دઌͷஂମͱدϓϥϯΛબͿ͚ͩɻ1Ͱ ؆୯ʹد͕Ͱ͖ΔΞϓϦͰ͢ɻدͷ͓ྱ ͱͯ͠ɺΦϦδφϧεςοΧʔ͕ಧ͘Έ ʹͳ͍ͬͯ·͢ɻ 11
SwiftUI SwiftUI ͱ UIKit ߹ܭΛ100%ͱͯ͠ܭࢉ 95% Ҏ্ 12
Engineer iOS / GCF / Firebase DB 01 ਓ 13
։ൃظؒ େن༷มߋ2ճ࣮ࢪ 02 ϲ݄ 14
SwiftUI ࠾༻ཧ༝ ॏཁʂ 15
1. SwiftUI Ͱͷ։ൃྺ༗Γ 2. ݱঢ়ͷ SwiftUI Ͱ࣮ݱͰ͖Δ UI 3. ։ൃ
㲗 FB ͷճసεϐʔυΛॏཁࢹ 4. SwiftUI ʹର͢ΔݟΛ૿͢ SwiftUI ࠾༻ཧ༝ 16
1. SwiftUI Ͱͷ։ൃྺ༗Γ 2. ݱঢ়ͷ SwiftUI Ͱ࣮ݱͰ͖Δ UI 3. ։ൃ
㲗 FB ͷճసεϐʔυΛॏཁࢹ 4. SwiftUI ʹର͢ΔݟΛ૿͢ SwiftUI ࠾༻ཧ༝ 17
SwiftUI Ͱͷ։ൃྺ༗Γ iOS13 ਖ਼ࣜϦϦʔεϲ݄ޙ ݸਓͰ SwiftUI ΞϓϦΛϦϦʔε 18
1. SwiftUI Ͱͷ։ൃྺ༗Γ 2. ݱঢ়ͷ SwiftUI Ͱ࣮ݱͰ͖Δ UI 3. ։ൃ
㲗 FB ͷճసεϐʔυΛॏཁࢹ 4. SwiftUI ʹର͢ΔݟΛ૿͢ SwiftUI ࠾༻ཧ༝ 19
ݱঢ়ͷ SwiftUI Ͱ࣮ݱͰ͖Δ UI iOS14 Ҏ͕߱λʔήοτ ࡉ͔͍Ξχϝʔγϣϯ؆୯ʹ࣮Ͱ͖Δ 20
1. SwiftUI Ͱͷ։ൃྺ༗Γ 2. ݱঢ়ͷ SwiftUI Ͱ࣮ݱͰ͖Δ UI 3. ։ൃ
㲗 FB ͷճసεϐʔυΛॏཁࢹ 4. SwiftUI ʹର͢ΔݟΛ૿͢ SwiftUI ࠾༻ཧ༝ 21
։ൃ 㲗 FB ͷճసεϐʔυΛॏཁࢹ Xcode Previews ͰଈνʔϜڞ༗ খ͞ͳεύϯͰ։ൃͱमਖ਼Λ܁Γฦ͢͜ͱ͕Մೳʂ 22
1. SwiftUI Ͱͷ։ൃྺ༗Γ 2. ݱঢ়ͷ SwiftUI Ͱ࣮ݱͰ͖Δ UI 3. ։ൃ
㲗 FB ͷճసεϐʔυΛॏཁࢹ 4. SwiftUI ʹର͢ΔݟΛ૿͢ SwiftUI ࠾༻ཧ༝ 23
SwiftUI ʹର͢ΔݟΛ૿͢ ۤઓՕॴΛத৺ʹΞτϓοτ جຊతʹ SwiftUI ͱ͍͏ڧ੍͍Ͱଟ͘ͷֶͼΛಘͨ 24
SwiftUI ϨΠΞτςΫχοΫ େن༷มߋΣϧΧϜʂ 25
1. UIKit ͱൺֱ͢ΔΧελϜϘλϯ 2. εΫϦʔϯϩάͰֶͿॲཧͷڞ௨Խ 3. ΞχϝʔγϣϯͷରԠ SwiftUI ϨΠΞτςΫχοΫ 26
1. UIKit ͱൺֱ͢ΔΧελϜϘλϯ 2. εΫϦʔϯϩάͰֶͿॲཧͷڞ௨Խ 3. ΞχϝʔγϣϯͷରԠ SwiftUI ϨΠΞτςΫχοΫ 27
SwiftUI ϨΠΞτςΫχοΫ օ͞ΜɺͲͷΑ͏ʹ࡞Γ·͔͢ʁ 28
UIKit ver. 29
SwiftUI ϨΠΞτςΫχοΫ 30
SwiftUI ϨΠΞτςΫχοΫ UIButton Λܧঝͨ͠ΧελϜΫϥεΛ࡞ 31
SwiftUI ϨΠΞτςΫχοΫ ΦʔόʔϥΠυͯ͠ػೳΛΧελϚΠζ͍ͯ͘͠ 32
SwiftUI ϨΠΞτςΫχοΫ ҙͷλΠϛϯάͰ০ 33
SwiftUI ver. 34
SwiftUI ϨΠΞτςΫχοΫ 35
SwiftUI ϨΠΞτςΫχοΫ Button ΛؚΉΧελϜϏϡʔΛ࡞ 36
SwiftUI ϨΠΞτςΫχοΫ ০ελΠϧͱͯ͠ผఆٛ Point ! 37
SwiftUI ϨΠΞτςΫχοΫ ButtonStyle Protocol ʹ४ڌͨ͠ߏମΛఆٛ 38
SwiftUI ϨΠΞτςΫχοΫ ButtonStyleCon fi guration ߏମΛҾʹऔΔؔΛએݴ 39
SwiftUI ϨΠΞτςΫχοΫ ButtonStyleCon fi guration ʹ Button ͷ Label ؚ͕·ΕΔ
40
SwiftUI ϨΠΞτςΫχοΫ ϝιουνΣʔϯͰ০ΞχϝʔγϣϯΛࢪ͢ 41
SwiftUI ϨΠΞτςΫχοΫ ButtonStyleCon fi guration ʹ ԡ͞Ε͍ͯΔ͔Λࣔ͢ϑϥάؚ͕·ΕΔ 42
SwiftUI ϨΠΞτςΫχοΫ buttonStyle ϝιουʹελΠϧͷΠϯελϯεΛ͚ͩ͢ 43
1. UIKit ͱൺֱ͢ΔΧελϜϘλϯ 2. εΫϦʔϯϩάͰֶͿॲཧͷڞ௨Խ 3. ΞχϝʔγϣϯͷରԠ SwiftUI ϨΠΞτςΫχοΫ 44
SwiftUI ϨΠΞτςΫχοΫ օ͞ΜɺͲͷΑ͏ʹεΫϦʔϯϩάऔΓ·͔͢ʁ 45
SwiftUI ϨΠΞτςΫχοΫ 46
SwiftUI ϨΠΞτςΫχοΫ ڞ௨ॲཧ ViewModi fi er ͱͯ͠ผఆٛ 47 Point !
SwiftUI ϨΠΞτςΫχοΫ 48
ViewModi fi er Protocol ʹ४ڌͨ͠ߏମΛఆٛ SwiftUI ϨΠΞτςΫχοΫ 49
Modi fi er Λࢦఆͨ͠ରͷ View ͕ͬͯ͘Δ SwiftUI ϨΠΞτςΫχοΫ 50
ରͱͳΔ View ͷ onAppear ͰॲཧΛ࣮ߦ SwiftUI ϨΠΞτςΫχοΫ 51
͜͜Ͱ০Λߦ͑ ϨΠΞτͷڞ௨Խ͕Մೳʹ SwiftUI ϨΠΞτςΫχοΫ 52
1. UIKit ͱൺֱ͢ΔΧελϜϘλϯ 2. εΫϦʔϯϩάͰֶͿॲཧͷڞ௨Խ 3. ΞχϝʔγϣϯͷରԠ SwiftUI ϨΠΞτςΫχοΫ 53
SwiftUI ϨΠΞτςΫχοΫ 54
AnimatableModi fi er Protocol ʹ४ڌͨ͠ߏମΛఆٛ SwiftUI ϨΠΞτςΫχοΫ 55
͜ͷมߋ͕Ξχϝʔγϣϯ͠ͳ͕ΒదԠ͞ΕΔΑ͏ʹͳΔ SwiftUI ϨΠΞτςΫχοΫ 56
UIKit ͷුؾ ̑ˋͷ 57
1. ුؾ૬ख 2. ෦తʹ UIKit Λར༻͢Δํ๏ 3. ৄͪ͘͜͠Βʂ UIKit ͷුؾ
58
1. ුؾ૬ख 2. ෦తʹ UIKit Λར༻͢Δํ๏ 3. ৄͪ͘͜͠Βʂ UIKit ͷුؾ
59
UIKit ͷුؾ TextField ͕ඞཁͳը໘ UIKit Ͱ։ൃ 60
UIKit ͷුؾ 61 InputAccessoryView ؆୯ʹΩʔϘʔυϝχϡʔΛ࡞Մೳ
UIKit ͷුؾ 62 BecomeFirstResponder ࣍ͷೖྗཝʹࣗಈҠಈՄೳ ※ iOS15 ͔Β SwiftUI Ͱਖ਼ࣜαϙʔτ
UIKit ͷුؾ 63 UIScrollView.setContentOffset ೖྗͷ͛ʹͳΒͳ͍ҐஔʹεΫϩʔϧ
1. ුؾ૬ख 2. ෦తʹ UIKit Λར༻͢Δํ๏ 3. ৄͪ͘͜͠Βʂ UIKit ͷුؾ
64
SwiftUI ϨΠΞτςΫχοΫ 65
UIViewControllerRepresentable Protocol ʹ४ڌͨ͠ߏମΛఆٛ SwiftUI ϨΠΞτςΫχοΫ 66
UIKit Ͱߏஙͨ͠ΫϥεΛॳظԽ SwiftUI ϨΠΞτςΫχοΫ 67
SwiftUI ϨΠΞτςΫχοΫ 68
SwiftUI ϨΠΞτςΫχοΫ 69
SwiftUI ϨΠΞτςΫχοΫ 70
UI ө SwiftUI ϨΠΞτςΫχοΫ 71
1. ුؾ૬ख 2. ෦తʹ UIKit Λར༻͢Δํ๏ 3. ৄͪ͘͜͠Βʂ UIKit ͷුؾ
72
UIKit ͷුؾ iOSDC ެࣜύϯϑϨοτܝࡌ UIKit ුؾͤ͟ΔΛಘͳ͍͔ҰॠͰஅʂ 73
SwiftUI ະରԠϥΠϒϥϦ ༉அېʂ 74
1. ࠇຐज़Λར༻͍ͯ͠ΔSDK 2. σόοάπʔϧ SwiftUI ະରԠϥΠϒϥϦ 75
1. ࠇຐज़Λར༻͍ͯ͠ΔSDK 2. σόοάπʔϧ SwiftUI ະରԠϥΠϒϥϦ 76
SwiftUI ະରԠϥΠϒϥϦ ࣗಈͰεΫϦʔϯϩάΛऔಘͰ͖ͳ͍ 77
1. ࠇຐज़Λར༻͍ͯ͠ΔSDK 2. σόοάπʔϧ SwiftUI ະରԠϥΠϒϥϦ 78
SwiftUI ະରԠϥΠϒϥϦ dani-gavrilov/GDPerformanceView-Swift 79
Summary 80
Summary 1. dim. SwiftUI Ͱ։ൃ͞Εͨ 2. ݅࣍ୈͰ SwiftUI ࠾༻Ձ͋Γ
3. ButtonStyle, ViewModi fi er 4. UIKit ͓Εͳ͘ 5. ֎෦ϥΠϒϥϦͷಈ࡞֬ೝ৻ॏʹ 81
Summary 1. dim. SwiftUI Ͱ։ൃ͞Εͨ 2. ݅࣍ୈͰ SwiftUI ࠾༻Ձ͋Γ
3. ButtonStyle, ViewModi fi er 4. UIKit ͓Εͳ͘ 5. ֎෦ϥΠϒϥϦͷಈ࡞֬ೝ৻ॏʹ 82
Summary 1. dim. SwiftUI Ͱ։ൃ͞Εͨ 2. ݅࣍ୈͰ SwiftUI ࠾༻Ձ͋Γ
3. ButtonStyle, ViewModi fi er 4. UIKit ͓Εͳ͘ 5. ֎෦ϥΠϒϥϦͷಈ࡞֬ೝ৻ॏʹ 83
Summary 1. dim. SwiftUI Ͱ։ൃ͞Εͨ 2. ݅࣍ୈͰ SwiftUI ࠾༻Ձ͋Γ
3. ButtonStyle, ViewModi fi er 4. UIKit ͓Εͳ͘ 5. ֎෦ϥΠϒϥϦͷಈ࡞֬ೝ৻ॏʹ 84
Summary 1. dim. SwiftUI Ͱ։ൃ͞Εͨ 2. ݅࣍ୈͰ SwiftUI ࠾༻Ձ͋Γ
3. ButtonStyle, ViewModi fi er 4. UIKit ͓Εͳ͘ 5. ֎෦ϥΠϒϥϦͷಈ࡞֬ೝ৻ॏʹ 85
@AkkeyLab 86
Thank you !! 87