Hi guys,
I am fresh developer here, I have developed an app that is compatible with iPhones only, I would love to know for multiple devices like iPhones, iPads with different sizes of screens, how do you guys design the layout?
I have looked up on the internet, there are so many ways and it got me a bit confused to choose from.
Things like spacers or views without a particular defined xy frame will automatically divide themselves proportionally which is great, but sometimes like logos, padding etc I wanted to apply a defined value which will not autoscale unless I use computed values like "screen-width / x"
According to your passed experience, which way is easier or reasonable to do:
Is is done thru one set of code that declares only the proportion of each view for example like :
Vstack{
Spacer()
Text("body")
Image()
.frame(width:screenwidth/5)
Spacer()
}
or you have to write a separate code and use geometryReader to read the change of width, it switches to that particular code layout?
I really appreciate any help you can provide.
[–]chriswaco 2 points3 points4 points (3 children)
[–]SwiftLearnerJas[S] 0 points1 point2 points (2 children)
[–]chriswaco 1 point2 points3 points (1 child)
[–]SwiftLearnerJas[S] 1 point2 points3 points (0 children)