改变和恢复view的方向

self.navigationController.view.transform = CGAffineTransformMakeRotation(M_PI/2);
    self.navigationController.view.frame = CGRectMake(0, 0, 320, 480);
    //设置应用程序的状态栏到指定的方向
    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
self.navigationController.view.transform = CGAffineTransformIdentity;
    self.navigationController.view.frame = [UIScreen mainScreen].bounds;
    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
原文地址:https://www.cnblogs.com/jiackyan/p/3382734.html