简体   繁体   English

如何自动调整iOS6的子视图大小,因为从iOS6中删除了自动调整大小?

[英]how to resize the subviews automatically for iOS6 because autoresize is removed from iOS6?

如何自动调整iOS6中视图中的所有子视图,因为从iOS6中删除了自动调整大小?

Technically the answer is to use autolayout, the replacement to the original autoresize feature available in previous iOS versions. 从技术上讲,答案是使用自动布局,替换以前iOS版本中提供的原始自动调整功能。

The new system, however, takes some time to get used to and to set up for all of your views and controls, so if you'd like to use the old autoresize controls, you can! 但是,新系统需要一些时间来习惯并设置所有视图和控件,因此如果您想使用旧的自动调整大小控件,则可以! It hasn't been removed, it's just that new apps and storyboards are automatically configured to use autolayout by default. 它尚未被删除,只是新的应用程序和故事板被自动配置为默认使用自动布局。

If you deselect "Use autolayout" in your storyboard files (first tab of the Utilities panel) then autolayout will be disabled and the autosizing controls will be available again. 如果取消选择故事板文件中的“使用自动布局”(“工具”面板的第一个选项卡),则将禁用自动布局,并且将再次使用自动调整控件。

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

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