Yesterday, apart from revealing a $999 monitor stand, Apple announced SwiftUI which got me quite excited.
SwiftUI is an innovative, exceptionally simple way to build user interfaces across all Apple platforms with the power of Swift. Build user interfaces for any Apple device using just one set of tools and APIs. With a declarative Swift syntax that’s easy to read and natural to write, SwiftUI works seamlessly with new Xcode design tools to keep your code and design perfectly in sync.
The code samples feels very React Native like imho:
List(landmarks) { landmark in
HStack {
Image(landmark.thumbnail)
Text(landmark.name)
Spacer()
if landmark.isFavorite {
Image(systemName: "star.fill")
.foregroundColor(.yellow)
}
}
}
As @orta noted:
None of these SwiftUI primitives feel Cocoa specific, it’s likely layoung the groundwork’s for a cross platform UI system.
If so, that’s brilliant
— ./orta –tsc (@orta) June 3, 2019
🤔 Wondering how fast one could build stuff when SwiftUI is combined with the also announced Combine Framework
Leave a comment