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.3k
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
310
The Great Swift Migration
yhkaplan
1
4.2k
Speeding Up Your CI
yhkaplan
0
520
Automate All the Things
yhkaplan
4
2.6k
Other Decks in Programming
See All in Programming
New "Type" system on PicoRuby
pocke
1
810
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
450
Lessons from Spec-Driven Development
simas
PRO
0
170
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
670
ふつうのFeature Flag実践入門
irof
7
3.7k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
Claspは野良GASの夢をみるか
takter00
0
180
Modding RubyKaigi for Myself
yui_knk
0
910
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
530
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
950
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Un-Boring Meetings
codingconduct
0
310
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
Between Models and Reality
mayunak
4
330
エンジニアに許された特別な時間の終わり
watany
107
250k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
So, you think you're a good person
axbom
PRO
2
2.1k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Abbi's Birthday
coloredviolet
2
8k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
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