【发布时间】:2011-12-07 10:22:04
【问题描述】:
我收到以下代码的上述编译器警告。我了解接口和设备方向之间的区别,但不确定如何修改以删除警告。有人可以帮忙吗?
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
if (ViewController != NULL) {
[ViewController configureForDeviceOrientation:toInterfaceOrientation];
}
if (Controller != NULL) {
[Controller configureForDeviceOrientation:toInterfaceOrientation];
}
currentOrientation = toInterfaceOrientation;
}
【问题讨论】:
-
你可以为 configureForDeviceOrientation 方法添加方法签名
标签: iphone objective-c xcode sdk uideviceorientation