[英][iOS]Can I change the size of a freeform UIViewController on code?
I want to change the size of UIViewController
whose size has already set in storyboard
as freeform
. 我想更改UIViewController
的大小,该大小已在storyboard
freeform
设置为freeform
。 I need to remove some subview
s after I get a certain result from a server. 从服务器获得一定结果后,我需要删除一些subview
。 Originally the size is 320x750 but it sometimes will be reduced to 320x500. 最初的尺寸为320x750,但有时会缩小为320x500。
I use autolayout. 我使用自动版式。
Any suggestions? 有什么建议么?
I would remove autolayout and then use 我会删除自动版式,然后使用
setPreferredContentSize:(CGSize)
If you want to keep autolayout, you'll have to programatically add constraints. 如果要保留自动版式,则必须以编程方式添加约束。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.