Building Shopie for Mac with SwiftUI
The article discusses challenges and criticisms of SwiftUI, particularly regarding its cross-platform approach and adaptability across different Apple devices. The author argues that SwiftUI's design prioritizes code reuse over optimal user experience, especially when scaling interfaces from watchOS to Mac. Interface Builder and Auto Layout are presented as more reliable alternatives for creating adaptive UIs on macOS.
- ▪SwiftUI is criticized for prioritizing cross-platform code reuse over tailored user experiences.
- ▪Interface Builder and Auto Layout are described as effective tools that still work well for macOS development.
- ▪The author believes SwiftUI can break layouts during OS updates, unlike more predictable systems like CSS.
- ▪Size classes in Apple's frameworks are seen as limiting and not always practical for determining device orientation.
- ▪Building a WYSIWYG editor is challenging when UIs must adapt to varying screen sizes, resolutions, and input methods.
Opening excerpt (first ~120 words) tap to expand
> I’m not entirely sure, but I think this is different for SwiftUI (and many other Apple frameworks). Maybe it was the original intention for watchOS, but certainly not for UIKit+. It doesn’t seem it was “app first”. (even just for something seemingly simple/baseline, like building TextEdit or Finder) It was built for "Apple cross platform" first. Just try to reuse as much as possible. > Sorry, the point I was trying to make is that it is extremely difficult, if at all possible, to make a WYSIWYG editor for a UI that can look vastly different depending on screen size, resolution, DPI, input device, and so on, and whose visual expression is dependent on rulesets rather than something that can be directly manipulated in a GUI.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Mjtsai.