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
190
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
130
顔写真メイクアップアプリの開発におけるプライバシー保護とコスト削減のための手法
akkeylab
1
360
How to hide the key
akkeylab
0
300
Other Decks in Programming
See All in Programming
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Jakarta EE meets AI
ivargrimstad
0
580
受け取る人から提供する人になるということ
little_rubyist
0
230
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
520
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
190
C++でシェーダを書く
fadis
6
4.1k
距離関数を極める! / SESSIONS 2024
gam0022
0
280
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
870
RubyLSPのマルチバイト文字対応
notfounds
0
120
Click-free releases & the making of a CLI app
oheyadam
2
110
EventSourcingの理想と現実
wenas
6
2.3k
Featured
See All Featured
A better future with KSS
kneath
238
17k
Docker and Python
trallard
40
3.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Fireside Chat
paigeccino
34
3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Raft: Consensus for Rubyists
vanstee
136
6.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
KATA
mclloyd
29
14k
Producing Creativity
orderedlist
PRO
341
39k
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