UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
возвращает UIInterfaceOrientation
, текущую ориентацию строки состояния приложения.
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
возвращает UIDeviceOrientation, ориентацию устройства.Но учтите, что UIDeviceOrientation
не всегда UIInterfaceOrientation
.Например, когда ваше устройство находится в простой таблице, вы можете получить неожиданное значение.