2012-01-22 2 views
0

Мне нужна помощь в решении проблемы. Я хочу изменить modalPresentationStyle динамически, когда он откроется, после поворота события. Я пишу это для создания modalViewchangin modalПреобразованиеСоздание после ротаций

ZUITableViewController *ivc = [[ZUITableViewController alloc] init]; 
    ivc.delegate = self; 
    _modalIsShowing = TRUE; 
    UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:ivc]; 
    if (UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) 
    { 
     nc.modalTransitionStyle = UIModalTransitionStyleCoverVertical; 
     nc.modalPresentationStyle = UIModalPresentationFormSheet; 

    } 
    else{ 
     nc.modalPresentationStyle = UIModalPresentationFullScreen; 
    } 
    [self presentModalViewController:nc animated:YES]; 
    [ivc release]; 
    [nc release]; 

ответ

0

лома, если заявление UIModalPresentationPageSheet ведет себя должным образом, чтобы начать с.

ZUITableViewController *ivc = [[ZUITableViewController alloc] init]; 
ivc.delegate = self; 
_modalIsShowing = TRUE; 
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:ivc]; 
nc.modalPresentationStyle = UIModalPresentationPageSheet; 
[self presentModalViewController:nc animated:YES]; 
[ivc release]; 
[nc release]; 
+0

О, спасибо большое) – nabiullinas