Я пытаюсь реализовать что-то, где я застрял в какой-то момент.Ограничение ориентации интерфейса в iOS 7 и iOS 8
Я хочу, чтобы некоторые ограничения ориентации следующим образом:
для iPhone 4, 4S, 5, 5S, & 6 - Портрет Только
для iPhone 6 Plus - Оба портрета & Ландшафтный дизайн
Для iPad - оба Po rtrait & Пейзаж
Я попробовал все комбинации кодирования. Наконец я получил решение для IOS 8
**(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window // iOS 6 autorotation fix
{**
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
if ([[UIScreen mainScreen] respondsToSelector: @selector(scale)])
{
if(IS_IPHONE_4_AND_OLDER){
printf("Device Type : iPhone 4,4s ");
return UIInterfaceOrientationMaskPortrait;
}
else if(IS_IPHONE_5){
printf("Device Type : iPhone 5,5S/iPod 5 ");
return UIInterfaceOrientationMaskPortrait;
}
else if(IS_IPHONE_6){
printf("Device Type : iPhone 6 ");
return UIInterfaceOrientationMaskPortrait;
}
else if(IS_IPHONE_6P){
printf("Device Type : iPhone 6+ ");
return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortrait;
}
}
return UIInterfaceOrientationMaskPortrait;
}
else{
printf("Device Type : iPad");
return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortrait;
}
}
Используя выше коды я управляю для прошивки 8 Но он не работает в прошивке 7 или менее
Пожалуйста, помогите мне решить эту проблему ...
Thank you