Xcode 4.5 + UIScrollView: Cannot see struts and springs (OSX 10.8 Mountain Lion)

倾然丶 夕夏残阳落幕 提交于 2019-12-03 10:27:01
Simon Germain

In Xcode 4.5, for iOS 6 and OSX 10.8 development, AutoLayout is being enabled by default.

To turn it off, open your xib file and click on a blank spot (not on a view or any component). On the inspector panel, select the first tab and remove the "Use Autolayout" checkbox. Your springs and struts will be back.

You have Autolayout enabled for the view, turn that off and it will look like what you expect. Autolayout is a new feature for iOS6 that allows more granular control of how things are laid out, and really enhances what was previously available via the struts and sprints via autoresizing masks.

To turn if off, open the Identify Inspector, and uncheck "Use Autolayout"

Same answer as the other two, but for projects using storyboards: instead of opening a xib file, you can simply open the storyboard to see the "Use Autolayout" checkbox in the inspector panel.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!