Xcode 如何在iOS5中旋转视图?
我在应用程序中使用了Xcode 如何在iOS5中旋转视图?,xcode,rotation,uisplitviewcontroller,Xcode,Rotation,Uisplitviewcontroller,我在应用程序中使用了splitviewController。应用程序的方向严格设置为横向。我已经在构建设置中正确地完成了它 当我在iOS 5.1或更高版本中运行我的应用程序时,它运行得很好。但当我在iOS 5或更低版本中运行应用程序时,应用程序的方向不会更改为横向。这是个大问题。有什么解决办法吗 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Re
splitviewController
。应用程序的方向严格设置为横向。我已经在构建设置中正确地完成了它
当我在iOS 5.1或更高版本中运行我的应用程序时,它运行得很好。但当我在iOS 5或更低版本中运行应用程序时,应用程序的方向不会更改为横向。这是个大问题。有什么解决办法吗
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
简单。插入以下内容:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
简单。插入以下内容:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
你应该换新衣服
return (interfaceOrientation == UIInterfaceOrientationPortrait);
声明
return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
你应该换新衣服
return (interfaceOrientation == UIInterfaceOrientationPortrait);
声明
return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
在所有
viewControllers
中为orientation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
[super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
在所有
viewControllers
中为orientation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
[super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
尝试返回((interfaceOrientation==UIInterfaceOrientationAndscapeLeft)| |(interfaceOrientation==UIInterfaceOrientationAndscapeRight))代码>尝试返回((interfaceOrientation==UIInterfaceOrientationAndscapeLeft)| |(interfaceOrientation==UIInterfaceOrientationAndscapeRight))代码>