Open kuotinyen opened 3 years ago
Q:How to make proportion Spacer
in SwiftUI
like Flutter
flex
?
A:Maybe can use double Spacer
to make its length 2x
.
Q:Will ScrollView
+ LazyVStack
cause cell reuse performance issue?
A:Unknown.
Q:How to refactor with Router? A:https://stackoverflow.com/questions/61304700/swiftui-how-to-avoid-navigation-hardcoded-into-the-view
Q:How to solve NavigationLink
destination pre-initialize performance issue?
A:Wrap the view in LazyView() to make destination lazy.
struct LazyView<Content: View>: View {
let build: () -> Content
init(_ build: @autoclosure @escaping () -> Content) {
self.build = build
}
var body: Content {
build()
}
}
Repository: https://github.com/kuotinyen/ios-taipei
Description:
Live coding to show basic
SwiftUI
View and layout way.Google Meet:
https://meet.google.com/hjy-jmmk-wzi