4 ms·
Where it works, SwiftUI is indisputably the most compact and maintainable form of data bindings and auto-layout that you have. It should be used immediately fo
by makecheck 6y ago
Where it works, SwiftUI is indisputably the most compact and maintainable form of data bindings and auto-layout that you have. It should be used immediately for those working cases.
It is therefore critical to also learn the bridges (e.g. how to get a platform-specific view or controller out of SwiftUI) because you will also want those somewhere.
Note, I have seen Herculean attempts on blogs, etc. to shoehorn ungodly amounts of hacks into SwiftUI objects to get certain behaviors that don’t exist yet; That Is Wrong. Do not fight this framework; either use a native element with full functionality and a bridge, or a succinct SwiftUI description. It is clear that “someday” everything will have a nice SwiftUI version and it isn’t worth faking it for now wherever it doesn’t work yet.
- LeoNatan25 6y agoWhat I don’t understand is why Apple made accessing the underlying UIKit/AppKit elements such a fight in the first place. They knew they couldn’t encompass the full breadth of these frameworks in many years to come, so why not allow easy access to underlying implementation details, to allow fine tuning for those that want/need it. Really dumb decision making, but that seems to be a lot of what Apple is doing in the last few years.