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
110
How to build visionOS apps using Persona
akkeylab
1
200
Summary - Introducing enterprise APls for visionOS
akkeylab
0
400
Apple Vision Pro trial session
akkeylab
0
230
How to support Privacy Manifest
akkeylab
0
360
Let's make it compatible with visionOS!
akkeylab
0
210
Let's Join the Android community!
akkeylab
0
140
顔写真メイクアップアプリの開発におけるプライバシー保護とコスト削減のための手法
akkeylab
1
360
How to hide the key
akkeylab
0
300
Other Decks in Programming
See All in Programming
Jakarta EE meets AI
ivargrimstad
0
650
RubyLSPのマルチバイト文字対応
notfounds
0
120
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
690
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Realtime API 入門
riofujimon
0
150
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
620
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
65
11k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Writing Fast Ruby
sferik
627
61k
Designing for humans not robots
tammielis
250
25k
Statistics for Hackers
jakevdp
796
220k
What's in a price? How to price your products and services
michaelherold
243
12k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Building Applications with DynamoDB
mza
90
6.1k
Become a Pro
speakerdeck
PRO
25
5k
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