Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xcode 如何在iOS5中旋转视图?_Xcode_Rotation_Uisplitviewcontroller - Fatal编程技术网

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))