取消Constraints(约束)html
问题描述:xib文件设计的时候控件已经摆好位置,可是每次调试的时候控件的位置又乱了ios
解决方法:选中 xib文件,在右侧第一项(Identity and type)的Interface Builder Document 中取消 Use AutoLayout 选项便可。iphone
建议:这种自动约束出如今ios6及之后版本,对iphone横屏、竖屏切换时控件的布局控制颇有效,取代了之前用繁琐的代码实现方式,固然也可用于iPhone、ipad界面,比较实用,建议学习使用自动约束。布局
学习网址:学习
英文:http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2ui
中文翻译:http://blog.sina.com.cn/s/blog_5a6efa330101d5sx.htmlspa