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
Migrating from UIKit to SwiftUI efficiently
Search
yhkaplan
September 20, 2020
Programming
3.9k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Migrating from UIKit to SwiftUI efficiently
yhkaplan
September 20, 2020
More Decks by yhkaplan
See All by yhkaplan
Using the latest UICollectionView APIs
yhkaplan
0
3.5k
Swift and Concurrency: The Plan for World Domination
yhkaplan
0
210
Backend-Driven UI: Making Screens Dynamic
yhkaplan
1
1.9k
Property Wrappers
yhkaplan
0
620
Parser Combinators
yhkaplan
0
320
The Great Swift Migration
yhkaplan
1
4.3k
Speeding Up Your CI
yhkaplan
0
520
Automate All the Things
yhkaplan
4
2.7k
Other Decks in Programming
See All in Programming
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.6k
SlackアプリとLambdaの 連携を構築した話
pawn_4_s
1
120
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
650
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
240
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
130
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
560
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
270
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
420
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
150
Cloudflare is Agents
chimame
0
170
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
210
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Building an army of robots
kneath
306
46k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Being A Developer After 40
akosma
91
590k
Building Adaptive Systems
keathley
44
3.2k
The Cult of Friendly URLs
andyhume
79
7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
How GitHub (no longer) Works
holman
316
150k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
800
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Transcript
Migrating from UIKit to Swi!UI efficiently final class MyViewController: UITableViewController
{ private var data = [String]() override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell") let d = data[indexPath.row] cell?.textLabel?.text = d return cell ?? UITableViewCell() } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return data.count } } ↓ struct MyView: View { private var data = [String]() var body: some View { List(data, id: \.self) { d in Text(d) } } } 1
Self Intro — Name: Joshua Kaplan — Work: minne @
GMO Pepabo — Interests: ! CI/CD, " frameworks, and more — Hobbies: # bread, $ history, and running 2
Intro 1. Why move to SwiftUI? 2. Why not move
to SwiftUI? 3. Modernize Swift Usage 4. Modernize UIKit usage 5. Plan and prototype 6. Two approaches 7. Tips 3
Why move to Swi!UI — Do more with less code
(for most things) — Easier to implement — The future of GUI development 4
Why not move to Swi!UI — Stability — iOS 12
and less compatibility — Low-level or high performance needs — Mixing can be difficult and painful without planning — How urgent? 5
Modernize Swi! usage — Migrate from Objective-C! — Use latest
Swift version — Use Swiftier conventions — Use all the latest features — Get familiar with FRP frameworks 6
Modernize UIKit usage — Use auto layout — Support safe
area — Components — Thin or no storyboards — Dynamic type and dark mode — Use declarative UIKit APIs 7
Plan and prototype 8
Prototype — Make a prototype — Identify screens/components not suited
to SwiftUI — Change the design — Make an iOS 13-only feature 9
Architecture — Redux — The Composable Architecture (TCA) — MVVM
10
Two approaches 11
12
Tips — Don't mix too much — Start with easier
screens — Don’t hurry — Study SwiftUI and Combine in advance 13
Conclusion 14
Thank you 15
Reference 16
Prototype — Shop.app 17
Combine 18
Docs — Official Documentation — RxSwift to Combine Cheatsheet —
CombineϑϨʔϜϫʔΫ·ͱΊ 19
Code — CombineSwiftPlayground — Combine-MVVM — OpenCombine 20
Video — Introducing Combine — Combine in Practice 21
Books — Using Combine — Practical Combine — Understanding Combine
— Combine: Asynchronous Programming with Swift 22
Swi!UI — Official Documentation 23
Books — Thinking in SwiftUI — SwiftUI by Tutorials 24