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:

 

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

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

- (BOOL) shouldAutorotate;
{
  return YES;
}

posted @ 2013-12-03 22:33  菁菁工作室  阅读(260)  评论(0编辑  收藏  举报