[iOS]我可以在代码上更改自由格式UIViewController的大小吗?

时间:2014-11-28 07:43:28

标签: ios objective-c uiviewcontroller autolayout

我想将UIViewController的大小storyboard更改为freeform subview。 从服务器获取某个结果后,我需要删除一些{{1}}。 最初尺寸为320x750但有时会减少到320x500。

我使用autolayout。

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

我会删除autolayout然后使用

   setPreferredContentSize:(CGSize)

如果你想保持自动布局,你必须以编程方式添加约束。