在Xcode中,我在FBConnect的以下行中收到警告:
_orientation = [UIApplication sharedApplication].statusBarOrientation;
这是完整的警告:
Implicit conversion from enumeration type 'UIInterfaceOrientation' to different enumeration type 'UIDeviceOrientation'
我有什么想法可以解决这个问题吗?
谢谢!
答案 0 :(得分:39)
尝试更改
_orientation = [UIApplication sharedApplication].statusBarOrientation;
到
_orientation = (UIDeviceOrientation)[UIApplication sharedApplication].statusBarOrientation;
答案 1 :(得分:2)
这个怎么样?
UIDeviceOrientation _orientation = [[UIDevice currentDevice] orientation];