iOS禁止全局 横屏 横屏调整视图

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

/////禁止全局 横屏
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
    return UIInterfaceOrientationMaskPortrait;
}
 
//横屏调整视图
- (void)layoutSubviews{
    barView.frame = CGRectMake(0, 0, SCREEN_WIDTH, DrawerBarHeight);
    NSLog(@"heng ping le a   qin  ");
}