iPhone/iPad : When to change background on rotate of device

标签 iphone ios ipad animation rotation

我应该在设备旋转的哪个点替换形成背景的图像。有 2 张图像,一张为风景,一张为肖像。

目前,我使用 WillRotate 事件,但它的性能“不稳定”,并且我收到关于不要在两阶段轮换中执行此操作的警告。

最佳答案

我使用其中一个 -

1. -(void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 持续时间:(NSTimeInterval)duration

在执行一步用户界面旋转之前发送到 View Controller 。

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

用户界面旋转后发送到 View Controller 。

关于iPhone/iPad : When to change background on rotate of device,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7504447/

相关文章:

iphone - 哪里可以找到iOS框架的.m文件

iOS 3rd Party Framework 确保没有网络连接

iphone - 如何使用 NSTimer

iphone - 从 JSON 中为 UITableView 排序 NSDictionary

Iphone 我正在使用 cocos2d 并且需要 Sprite 上像素的 rgba 值

iphone - 当我结束编辑并选择除 textfield 之外的另一个 uicontrol 时,textfieldDidEndEditing 方法不会被触发

iphone - 单击 IAP 并使用新 View

ios - 检查 iOS 上是否安装了 mobileconfig 配置文件

ios - 在 Cocoapods 中使用 Google Analytics 无法

iphone - 难以访问另一个 View Controller 中的对象