在ios10中,不推荐使用setStatusBarOrientation。旧项目代码的某些片段无法正常工作。那么如何解决呢?以下代码将根据需要更改ViewController:floatangle;CGRectrect;//UIInterfaceOrientationorientation;floatfWidth=_viewController.view.bounds.size.width;floatfHeight=_viewController.view.bounds.size.height;floatfMaxValue=(fWidth>fHeight)?fWidth:fHeight