strong textI have an iPad app which only allows landscape orientation, and launches in landscape orientation. I have a UIViewController
and in the viewDidLoad
I set the frame of the view:
self.view.frame = CGRectMake(0, 0, 1024, 728);
In a touchesBegan
function in that same UIViewController
I print out the view:
NSLog(@"%@",self.view);
and when I tap the screen get:
<UIView: 0x37e370; frame = (0 0; 768 1024); transform = [0, 1, -1, 0, 0, 0]; layer = <CALayer: 0x37e3d0>>
As you can see, the frame changes to [0,0,768,1024] (which is portrait iPad) instead of [0,0,1024,728] (which is what I defined it to be in the viewDidLoad
method).
Why is it switching on me?