我正在以编程方式检查设备和界面方向,但每次即使在纵向模式下也进入横向方向这是我的代码,请给我解决方案:-
if ([[UIDevice currentDevice]orientation] == UIDeviceOrientationLandscapeLeft||[[UIDevice currentDevice] orientation]== UIDeviceOrientationLandscapeRight || [self interfaceOrientation] == UIInterfaceOrientationLandscapeLeft || [self interfaceOrientation] == UIInterfaceOrientationLandscapeRight)
{
}
else
{
}