Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TCA with UIKit [TCAでわいわいLT会]
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
tatsubee
March 18, 2024
1.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TCA with UIKit [TCAでわいわいLT会]
tatsubee
March 18, 2024
More Decks by tatsubee
See All by tatsubee
マルチウィンドウ実践ガイド
shoryuyamamoto
0
350
Create Spatial Photo with ImagePresentationComponent
shoryuyamamoto
0
120
pixivのリアーキテクチャにおける The Composable Architecter活用
shoryuyamamoto
0
230
pixivアプリは変化する
shoryuyamamoto
0
1.2k
マルチウィンドウでアプリケーションの表現を拡張する
shoryuyamamoto
1
450
【After iOSDC LT Night〜ピクシブ×日経×タイミー〜】実装!Interactive Widgets
shoryuyamamoto
0
86
SwiftPM マルチモジュール構成への第一歩
shoryuyamamoto
0
3.4k
Dart Macrosに願いを [YOUTRUST x ゆめみ Flutter LT会@渋谷 #4]
shoryuyamamoto
0
930
riverpodを理解したい
shoryuyamamoto
0
220
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
950
Become a Pro
speakerdeck
PRO
31
6.3k
Automating Front-end Workflow
addyosmani
1369
210k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.1k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Docker and Python
trallard
47
4.2k
Transcript
Presented by 辰べえ 2024.03.18 Presented by 辰べえ TCA with UIKit
辰べえ iOSエンジニア 辰べえ iOSエンジニア 2 自己紹介 • 23新卒 • 福岡生まれ
福岡育ち 東京在住 • 最近やっていること ◦ お絵描き ◦ テニス ◦ iOS
UIKitでTCAを使うことを考える 3
UIKitでTCAを使うことを考える • 「TCAはSwiftUIで使うもの」という印象がある 4
UIKitでTCAを使うことを考える • 「TCAはSwiftUIで使うもの」という印象がある • しかし新規のプロダクトをSwiftUIで実装するならともかく、 以前からあるプロダクトでUIKit→SwiftUIの移行を今すぐに行うことは 容易ではない 5
UIKitでTCAを使うことを考える • 「TCAはSwiftUIで使うもの」という印象がある • しかし新規のプロダクトをSwiftUIで実装するならともかく、 以前からあるプロダクトでUIKit→SwiftUIの移行を今すぐに行うことは 容易ではない • じゃあUIKitではTCAはどのように使えるんだろう? 6
UIKitでTCAを使うことを考える • 「TCAはSwiftUIで使うもの」という印象がある • しかし新規のプロダクトをSwiftUIで実装するならともかく、 以前からあるプロダクトでUIKit→SwiftUIの移行を今すぐに行うことは 容易ではない • じゃあUIKitではTCAはどのように使えるんだろう? •
後世、UIKitからSwiftUIに移行することを前提として、あらかじめTCA を導入することも一つの手では? 7
UIKitにおけるTCAの基本的な実装 8
9 Reducerの実装
10 Storeの保持
11 Actionの実行
12 State変更時
注意点 13
14 状態の変化によって まとめて実行される
15 ←重い処理
16 処理の単位で分割! ←重い処理
UIKitからSwiftUIへの移行 17
UIKitからSwiftUIへの移行 18 UIKitからSwiftUIへの移行が簡単にできるか?
UIKitからSwiftUIへの移行 19 UIKitからSwiftUIへの移行が簡単にできるか? →場合による
UIKitからSwiftUIへの移行 20 ユーザーが実行するアクションが単純な場合: 移行は比較的簡単
UIKitからSwiftUIへの移行 21 アクションが複雑な場合: SwiftUI側に機能が足りていない場合がある
まとめ 22 • UIKitにTCAを採用することができるか? ◦ ◎ ◦ そもそもUIKitでも使いやすいよう作られている • 後々、UIKitからSwiftUIに移行しやすいか?
◦ ◦ ◦ 単純な機能(Tap等)であればReducerはそのまま移行できる ◦ 複雑な機能(Drag&Drop等)だと、ロジックの改修を必要とする場合がある ▪ とはいえ、Reducerの形は大きく変わらないので改修も難しくない(かも)
ご清聴 ありがとうございました! 23