我收到以下代码的上述编译器警告。我了解接口和设备方向之间的区别,但是不确定如何修改以消除警告。有人可以帮忙吗?
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
if (ViewController != NULL) {
[ViewController configureForDeviceOrientation:toInterfaceOrientation];
}
if (Controller != NULL) {
[Controller configureForDeviceOrientation:toInterfaceOrientation];
}
currentOrientation = toInterfaceOrientation;
}
最佳答案
只是将其投放[Controller configureForDeviceOrientation:(UIDeviceOrientation)toInterfaceOrientation];
关于iphone - 从枚举类型“UIInterfaceOrientation”到其他枚举类型“UIDeviceOrientation”的隐式转换,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8413750/