Many parts of SwiftUI directly build on top of existing UIKit components, such as UITableView. That might sound the same, but there’s an important difference: Apple isn’t saying that you can use identical SwiftUI code on every platform, because some things just aren’t possible – there’s no way to use the Apple Watch’s digital crown on a Mac, for example. The official line seems to be that SwiftUI is not a multi-platform framework, but is instead a framework for creating apps on multiple platforms. However, it’s important you don’t think of SwiftUI as being a multi-platform framework similar to Java’s Swing or React Native. This means if you work on an app that must support iOS N-1 or even N-2 – i.e., the current version and one or two before that – then you will be limited in terms of the features you can offer. SwiftUI runs on iOS 13, macOS 10.15, tvOS 13, and watchOS 6, or any future later versions of those platforms. This question has been asked so many times I added a dedicated chapter to this book so I could go into more detail: answering the big question: should you learn SwiftUI, UIKit, or both? Where can SwiftUI be used? So, here goes… Which to learn: SwiftUI or UIKit? Lots of people are already asking me questions about SwiftUI, and I’ve done my best to ask other people who know much more to try to find definitive answers as appropriate.
0 Comments
Leave a Reply. |