I'm really having tough time setting my layout right for all iPhone sizes. I have five buttons and I want them to be visible correctly for all iPhone sizes, see the screenshot. I've tried many constraints but no success. Following are my questions.
- What constraints do I need to add to these buttons to fit all iPhone screen sizes?
- When I change "wAny hAny" to some other settings, all my UI controls vanish. What can be the possible reason?
- Do I have to start in "Any Width | Any Height" configuration to design my app for all screen sizes?
1 个答案:
答案 0 :(得分:1)
3: it's a must: start of with Any x Any
2: other then Any x Any can have custom constraint settings (like bigger Font or const. for iPad). If things change when you switch to other then Any x Any then A: your constraints are messed up B: you have custom settings (which I doubt). Neither case I would recommend to start from Any x Any , remove all contraints, and start all over until Any x Any works! then move on to detailed customization.
1: use "greater or equal" relationship between the buttons horizontally. Add fix constraints if needed on the two sides.
Remove all warnings, read about it for two weeks :)