self.window.rootViewController.presentedViewController
self.window.rootViewController.presentedViewController возвращение ноль
всегда возвращаются всухую хотя есть ViewController доступны. Не уверен, что я делаю неправильно.
Ниже приводится полный code-
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
NSLog(@"this is loaded");
if ([self.window.rootViewController.presentedViewController isKindOfClass:[SecondViewController class]])
{
SecondViewController *secondController = (SecondViewController *) self.window.rootViewController.presentedViewController;
if (secondController.isPresented)
{
return UIInterfaceOrientationMaskLandscape;
}
else return UIInterfaceOrientationMaskPortrait;
}
else return UIInterfaceOrientationMaskPortrait;
}
Как вы представляете контроллер? –
с использованием метода делегата tableview, выбрал строку с индексом, – iosDev
detailViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self.navigationController pushViewController: detailViewController animated: NO]; – iosDev