按钮越来越重叠

时间:2013-01-27 16:47:25

标签: iphone ios6 uibutton

我是ios开发的新手,最近我开始创建简单的计算器,但是当我在模拟器上运行这个应用程序时,我面临一些真正的问题。我的按钮越过了一圈,在.xib中它们相互远离。什么时候解决这个问题我在更远的距离重新定位按钮,文字缩小或隐藏。

图片会清除我的问题This the problem which im facing and these three screen shots are the behavior of problem which is arising when im relocating my buttons :S Please help i've tried alot :S

仅供参考:我的模拟器版本是6.0,xcode版本是4.5.2!

1 个答案:

答案 0 :(得分:3)

默认情况下,Xcode 4.5.2中的新项目使用 Autolayout 。要关闭此选项,请选择.xib文件,使用文件检查器,然后取消选中“使用Autolayout”。当超级视图在界面中调整大小时(这与最初加载时和旋转时一样),这将使您的子视图不会跳转。

最终,您需要了解自动布局(以及自动调整和一般布局):

http://www.apeth.com/iOSBook/ch14.html#_layout