iOS 6 中需要哪些方法来处理方向?我用的是下面给出的,够了吗?
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
if (UIInterfaceOrientationLandscapeLeft == interfaceOrientation || UIInterfaceOrientationLandscapeRight == interfaceOrientation) {
return YES;
} else {
return NO;
}
}
我想让应用程序同时在 iOS5 和 iOS6 中工作