Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
orbitur
· 12y ago · 0 comments
How do you optimize for 3 different device sizes? Hardcoding it?
Comments
[–]
archagon
12y ago
You can perform manual layout in the layoutSubviews method of any UIView. Simply calculate your positions with the current view size in mind, looking up the Size Class if necessary. (And don't use exact pixel positions, obviously.)
[–]
orbitur
OP
12y ago
I know you can do that, but it just seems like less work and better results to set the proper constraints in IB.
[–]
archagon
12y ago
It depends on what you're doing. For example, good luck creating a keyboard in IB (especially with all the spacer views you'll be needing).