【发布时间】:2013-05-07 06:11:40
【问题描述】:
我正在尝试通过表单演示在 iPad 中加载 UIViewController。问题是这个新视图的大小,我将大小值放在 IBuilder 中,但模态视图采用固定值。
我也尝试像这样在 prepareForSegue 中进行此操作:
HelpViewController *viewController = segue.destinationViewController;
viewController.view.superview.frame = CGRectMake(0, 0, 200, 200);
但是不工作,有什么帮助吗?谢谢!
【问题讨论】:
-
嗨,我在模态视图的 viewWillAppear 方法中设置了自定义大小:[self.view.superview setBounds:CGRectMake(0, 0, 200, 200)];但是现在,窗口没有以布局为中心
-
stackoverflow.com/questions/25787946/… 点此链接即可获得解决方案
标签: ios objective-c ipad uipresentationcontroller