Integrate your app to modern world - Daiki Matsudate
===
{%hackmd FGRWt1UuTFKk0wSbGgg-SA %}
> 請從這裡開始
## YouTube
{%youtube EnCtlMRysFE %}
## Slide
{%speakerdeck d_date/integrate-your-app-to-modern-world %}
# 把現有專案跟潮潮的 SwiftUI 整合的入坑好時機!
> tldr: UIKit to SwiftUI
## the age of Declarative UI
* iOS: Swift UI
* iOS13 以上才支援🥺

## Small Components
* Use StackView as possible
* Use Xib as possible
* Use UIViewController than UIView
* Some of SwiftUI still be broken
* use UIKit instead
[VStackViewController](https://gist.github.com/d-date/294d4c791a273a502a68027a3a07d9f8)
## dataflow
* @ObservedObject
## using uivc in swiftui
too fast to read🤷🏼♂️ lol
just use VStack / HStack to layout...
## xib -> stactView
duo to preview in swiftUI can read `.xib`
use stack view instead xib
## Recap - UIKit to SwiftUI
* some of swiftui feature still be broken
* sometime need to use UIKit instead
* keeping components small is key factor to migrate
* 總之, 好像還有一些坑要踩, 並且要將您的畫面元件切割成小單元較佳
XieXie
https://developer.apple.com/videos/play/wwdc2019/226/
###### tags:`iPlayground2019`