UIInterfaceOrientation方向枚举:
UIInterfaceOrientationPortrait //home健在下UIInterfaceOrientationPortraitUpsideDown //home健在上
UIInterfaceOrientationLandscapeLeft //home健在左UIInterfaceOrientationLandscapeRight //home健在右
旋转屏幕时触发的函数:
//旋转方向发生改变时
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转动画前一半发生之前自动调用
-(void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转动画后一半发生之前自动调用
-(void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转之前自动调用
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转完成之后自动调用
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
}
//视图旋转动画前一半发生之后自动调用
-(void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
}
本文详细介绍了iOS设备中屏幕旋转的几种方向以及应用在不同旋转阶段触发的回调函数,包括旋转开始、过程及结束等关键阶段。
2040

被折叠的 条评论
为什么被折叠?



