Re:SwiftUI in 2022
by saagarjha on Wednesday May 25, 2022 @12:47PM
(#31507059)
UIStackView is much more boilerplate to use than just a HStack/VStack. And I do a lot of design work in SwiftUI–it's really easy to get stuff on the screen and directly how you want it to look, even for a design mockup. I'll just not hook up interactivity and it works just fine for that kind of storyboarding. If you have a designer that wants you to follow their lead "to the pixel" then they're probably not doing their job of UI design very well–a good process works both ways, where you provide insight into what works well on the platform and they provide their own suggestions until you meet in the middle.
[ Parent
| on HN ]
Then again, you can eliminate a lot of that boilerplate. I have a demo app up where I generate UIViews using resultBuillder such that you get a very SwiftUI-like experience using UIKit views.
> UIStackView is much more boilerplate to use than just a HStack/VStack.
It is. It's also far more flexible in return.
But the point is that if someone has to ask this question then they don't have enough experience with UIKit to be comparing SwiftUI and UIKit.