简体   繁体   English

iPhone5和iPhone4的布局

[英]Layout for iPhone5 vs iPhone4

In iPhone5 storyboard main view controller view, I have a dragged UIControls like UIButtons and others. 在iPhone5故事板主视图控制器视图中,我拖动了UIControls之类的UIControls以及其他UIControls。 The controls fill out the whole space all the way to bottom of the screen. 控件将整个空间填充到屏幕底部。 Well, on the iPhone 4 obviously the bottom portion of my view won't show due to smaller screen. 好吧,在iPhone 4上,由于屏幕较小,显然我的视图的底部不会显示。 What is the right way to handle this so it shows on both devices correctly? 什么是正确的方法来处理此问题,使其正确显示在两个设备上?

I think you have problem with View ResizingMask. 我认为您在使用View ResizingMask时遇到问题。 You have to set autoResizingMask . 您必须设置autoResizingMask

You can refer to this AutoResizingMask Related Question 您可以参考此AutoResizingMask相关问题

This will help you alot. 这将帮助您很多。 Try to set the autoResizingMask of control through xib. 尝试通过xib设置控件的autoResizingMask Sure you will get rid of your problem..!! 当然,您将摆脱您的问题..! Enjoy Coding 享受编码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM