问题
My app is a game and the menus have many labels and buttons and I cannot get all of the different screen sizes(iPhone 4/5/6/6+) to look acceptable from the same set of constraints.
Is there a way that you use to synchronize all the views together to look the same on all different screen sizes?
The project is locked to only portrait so I don't need to consider rotation.
回答1:
For Autolayout, you
- Consider the screen sizes you want to support.
- Which view/buttons/labels/imageview etc you want to remain fixed while in different screen size.
- Which view/buttons/labels/imageview etc can be scaled to fit the screen.
Now if by scaling the things you can fit on the screen then you are good to go. But if you still can't find way then you would probably need to you use scrollview and and add a UIView (let's call it content view) to it put your all stuff in it and constraint them vertically all the way from top to bottom.This video can help you if you want to use scrollview https://www.youtube.com/watch?v=UnQsFlMGDsI
来源:https://stackoverflow.com/questions/29559847/autolayout-just-not-working-for-every-screen-size