解决方案 »

  1.   


    - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
        return [window.rootViewController supportedInterfaceOrientations];
    }
    最主要的是ViewController里的方向方法,需要横屏的VC的所有父VC都要类似于这样写:// 针对对NavController的一个Demo
    - (BOOL)shouldAutorotate {
        return [[self.viewControllers lastObject] shouldAutorotate];
    }- (NSUInteger)supportedInterfaceOrientations {
        return [[self.viewControllers lastObject] supportedInterfaceOrientations];
    }- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
        return [[self.viewControllers lastObject] preferredInterfaceOrientationForPresentation];
    }然后在你需要横屏的VC里:- (NSUInteger)supportedInterfaceOrientations {
        return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeRight;
    }
      

  2.   

    能不能给我一个demo啊,谢谢大神
      

  3.   

    邮箱地址 [email protected]  感激
      

  4.   

    拍照的时候不会奔溃吧。
    但是相册的部分的确会。
    本人的做法是调用相册的时候不用系统的UIImagePickerController。
    完美解决。