-----2020年06月16日 更新
勘误:项目info.plist的横竖屏必须设置成只支持竖屏的,而appdelegate设置支持横竖屏,避免在没锁屏时,在手机设备横屏的时候,打开app导致只支持竖屏的页面,变成横屏,详情请到完整文章查阅
-------------------------------------- 我是分割线 --------------------------------------
使用方法
(1)将LERotationManager添加到项目中
(2)设置支持旋转的方向(勘误修正后)
第一:在info.plist文件或者General中设置成只支持竖屏
第二:在AppDelegate中设置同时支持横竖屏
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
return UIInterfaceOrientationMaskAllButUpsideDown;
}(3)创建RotationManager对象,并设置将要旋转的UIView
(4)触发rotate方法,实现横竖屏切换


