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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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.4k
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
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
260
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
440
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
110
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.6k
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
330
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
560
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
180
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1k
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
200
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
250
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.2k
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.8k
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
190
ラッコキーワード サービス紹介資料
rakko
1
4.1M
How to Think Like a Performance Engineer
csswizardry
28
2.7k
RailsConf 2023
tenderlove
30
1.5k
Deep Space Network (abreviated)
tonyrice
0
240
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
570
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Joys of Absence: A Defence of Solitary Play
codingconduct
1
420
Code Review Best Practice
trishagee
74
20k
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