我应该在设备旋转的什么时候替换形成背景的图像。有2张图像,一张用于风景,一张用于肖像。

当前,我使用WillRotate事件,但它的性能“起伏不定”,并且我收到有关在两阶段轮播中不执行此操作的警告。

最佳答案

我用-

1。
-(void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

在执行单步用户界面旋转之前,已发送给视图控制器。

要么

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation


用户界面旋转后发送到视图控制器。

10-06 15:56
查看更多