【发布时间】:2012-02-13 01:03:56
【问题描述】:
strong text我有一个 iPad 应用程序,它只允许横向方向,并以横向方向启动。我有一个UIViewController 并在viewDidLoad 中设置了视图的框架:
self.view.frame = CGRectMake(0, 0, 1024, 728);
在同一 UIViewController 的 touchesBegan 函数中,我打印出视图:
NSLog(@"%@",self.view);
当我点击屏幕时得到:
<UIView: 0x37e370; frame = (0 0; 768 1024); transform = [0, 1, -1, 0, 0, 0]; layer = <CALayer: 0x37e3d0>>
如您所见,框架更改为 [0,0,768,1024](即 iPad 纵向)而不是 [0,0,1024,728](我在 viewDidLoad 中将其定义为方法)。
为什么它会打开我?
【问题讨论】:
标签: ios ipad uiview uiviewcontroller