iOS5 and iOS6都只支持橫屏的方法

 

 

 

If your app uses a UINavigationController, then you should subclass it and set the class in IB. You would then want to override the following methods to support both iOS5 and iOS6:app

 

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
{
  return interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
 interfaceOrientation == UIInterfaceOrientationLandscapeRight;
}

- (NSUInteger)supportedInterfaceOrientations;
{
  return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
}

- (BOOL) shouldAutorotate;
{
  return YES;
}ide

相關文章
相關標籤/搜索