I find it difficult to still consider the screen size of iPhone 4s when I design the ui of my app in Xcode storyboard. I usually meet the case that for iPhone 7 I get much place left, but not enough place for iPhone 4s. is there a way to specially set some constraints for iPhone 4s? thank you all.
Asked
Active
Viewed 142 times
0
-
You can check for what model is running, but this is usually frowned upon. While I'm in the same boat - my adaptive layout is **reallllly** tight on the 4s - the right thing to do is keep your constraints as universal as possible. I managed to set some label font sizes just a bit below the HIG guidelines (they suggest 11 point minimum) to get things to fit. Truth is, you never know - Apple may decide next year to come back with a 4 inch phone for their 10th anniversary of the iPhone. – Dec 16 '16 at 00:13
-
In storyboard you can set constraints based on the size class of the phone. I haven't used storyboards in a while but I know they made it easier to deal with in xcode 8. There is a ton of stuff out there on learning how to set constraints using size classes. – JustinM Dec 16 '16 at 02:26
-
1Finally I found the solution here! http://stackoverflow.com/questions/28818962/size-class-specifically-for-portrait-3-5-inch-iphone-4s-xcode-6 – user3788747 Dec 16 '16 at 09:39