写在这里防止以后忘了,也提供给有需要的人。
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
if(([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait) || ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown)){//竖屏
NSLog(@"竖屏");
}else{//横屏
NSLog(@"横屏");
}
}
网友评论