Using some of the methods, I am able to check the orientations to which I am rotating my device. But how can I know the orientation in which I am in when the app is loaded? I want to write the code to rearrange the views in the viewDidLoad method by checking the way my orientation is in?
views:
96answers:
2
+2
A:
UIDeviceOrientation myOrientation = [[UIDevice currentDevice] orientation];
mihirpmehta
2010-04-20 04:52:31
A:
You could also use something similar to below in the ViewDidLoad/ViewWillAppear methods.
if(UIInterfaceOrientationIsLandscape(self.interfaceOrientation)){
}
Rob
2010-04-20 07:16:21