3 ms·
SwiftUI is a black box, yes, but under the hood, it's just wrapping all of the same AppKit/UIKit controls. It likely started as an answer to React for iOS and
by jarjoura 3y ago
SwiftUI is a black box, yes, but under the hood, it's just wrapping all of the same AppKit/UIKit controls.
It likely started as an answer to React for iOS and then late became a cross-platform toolkit. The API to get what you want and expect is terribly documented and poorly named. Countless times I stumble across the "right way" to do something, and it works well.
You just won't find it on StackOverflow (or ChatGPT) nor in any tutorial site. It will be buried in a small section of sample code from Apple or listed on a slide in a WWDC video.
My biggest complaint is that it tries to be too magical. Sometimes certain values are ignored and no amount of working around it will force it. Some internal decision for optimization didn't consider a specific use-case and there's no way to know. All I get is, configured one way, everything works, but change it, and suddenly it's ignored.
It took UIKit a decade to ease up on magical behavior, but SwiftUI didn't seem to learn that lesson and so it's back to square one.
- pohl 3y agoI thought it started for the watch, and was then brought to iOS and then macOS.