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.2k
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
71
How to build visionOS apps using Persona
akkeylab
1
130
Summary - Introducing enterprise APls for visionOS
akkeylab
0
360
Apple Vision Pro trial session
akkeylab
0
210
How to support Privacy Manifest
akkeylab
0
340
Let's make it compatible with visionOS!
akkeylab
0
180
Let's Join the Android community!
akkeylab
0
110
顔写真メイクアップアプリの開発におけるプライバシー保護とコスト削減のための手法
akkeylab
1
340
How to hide the key
akkeylab
0
280
Other Decks in Programming
See All in Programming
Polars を Kaggle コンペで使ってみた(LMSYS Chatbot Arena)
kohecchi
1
360
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
210
令和トラベルにおけるLLM活用事例:社内ツール開発から得た学びと実践
ippo012
0
110
私の考える初学者がBlazorできるまでの学習方法
tomokusaba
1
240
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
1
1.8k
Uncharted packages (Laravel Live Denmark)
freekmurze
0
140
月間4.5億回再生を超える大規模サービス TVer iOSアプリのリアーキテクチャ戦略 - iOSDC2024
techtver
PRO
1
560
フロントエンドカンファレンス北海道2024 『小規模サイトでも使えるVite 〜HTMLコーディングをよりスマートに〜』長谷川広武(ハム)
h2ham
1
2.5k
暴走のウホーレン 〜想いってのはvimrcにしないと伝わらないんだぜ〜 / iosdc_japan_2024
uhooi
1
240
デザインシステムとコンポーネント指向によるフロントエンド開発プロセスの革新 / Innovation in Frontend Development Processes through Design Systems and Component-Oriented Architecture
nrslib
7
5k
最高の構文木の設計 2024年版
yui_knk
7
2.3k
初めてのiOS関連GitHub ActionsをMarketplaceに公開するまでの実録
konifar
3
200
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
228
18k
For a Future-Friendly Web
brad_frost
173
9.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
165
48k
How to Think Like a Performance Engineer
csswizardry
15
910
Typedesign – Prime Four
hannesfritz
38
2.3k
Into the Great Unknown - MozCon
thekraken
28
1.4k
Practical Orchestrator
shlominoach
185
10k
Building Applications with DynamoDB
mza
89
5.9k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
The Cost Of JavaScript in 2023
addyosmani
39
5.1k
Writing Fast Ruby
sferik
623
60k
Agile that works and the tools we love
rasmusluckow
327
20k
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