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
230
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
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
130
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
ドメインイベント増えすぎ問題
h0r15h0
2
350
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
1
140
テストコード書いてみませんか?
onopon
2
130
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
830
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
270
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Making the Leap to Tech Lead
cromwellryan
133
9k
Why Our Code Smells
bkeepers
PRO
335
57k
It's Worth the Effort
3n
183
28k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
For a Future-Friendly Web
brad_frost
175
9.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Music & Morning Musume
bryan
46
6.2k
The Language of Interfaces
destraynor
154
24k
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