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
220
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
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
Foundry Localでエージェント開発
seosoft
0
120
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
200
初めての模倣学習とVLA
natsutan
0
450
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
620
Deep dive into the select statement (GopherCon UK)
jespino
0
170
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
53
35k
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
130
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.5k
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
310
自分的「カンファレンスの楽しみ方」
syumai
0
180
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
430
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
640
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Navigating Weather and Climate Data
rabernat
0
510
Building the Perfect Custom Keyboard
takai
2
860
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
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