我想获取设备的当前方向。我在 AppDelegate 类中编写了这段代码:我的代码:
if (UIInterfaceOrientation.LandscapeLeft == (UIInterfaceOrientation)UIDevice.CurrentDevice.Orientation &&
UIInterfaceOrientation.LandscapeRight == (UIInterfaceOrientation)UIDevice.CurrentDevice.Orientation) {
//code
} else {
//code
}
UIDevice.CurrentDevice.Orientation 给出未知数?