Can anyone confirm that [[UIDevice currentDevice] setOrientation:UIDeviceOrientationPortrait];
will get your app rejected by Apple.
Is there a good replacement available?
Can anyone confirm that [[UIDevice currentDevice] setOrientation:UIDeviceOrientationPortrait];
will get your app rejected by Apple.
Is there a good replacement available?
Hi,
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientation] is a private API, you can find that is signature is only in read-only (see here).
If you want set the device orientation to Portrait or other mode you should override the shouldAutorotateToInterfaceOrientation:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIDeviceOrientationPortrait);
}
You can change the frame and apply a transformation to the key window, and change the status bar orientation (which is public) to simulate changing the orientation.