In my info plist, I defined Supported Interface Orientations (iPad) as all orientations, and it works. The only problem is that if I start in landscape mode, it will start as a portrait, but if I turn and go back, it will be fixed. So how can I do this to take the launch orientation? THANKS.
You can force orientation by doing the following in your own didFinishLaunchingWithOptions:or in the view controller viewWillAppear:.
didFinishLaunchingWithOptions:
viewWillAppear:
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft animated:NO];
UIViewController, [window addSubview:viewController.view];, shouldAutorotateToInterfaceOrientation YES .
[window addSubview:viewController.view];
shouldAutorotateToInterfaceOrientation
iPad Portrait, , willRotateToInterfaceOrientation 0.
willRotateToInterfaceOrientation
I noticed that the orientation order of the interface from the main .plist files is also important. For example, http://monosnap.com/image/jJeImyVp6G3Mq1uXLSAVRA0te2VwgJ When starting, the application will be in landscape mode, and the home button will be on the right.