2012-01-22 4 views
0

문제가 생겼습니다. 이벤트를 회전시킨 후 modalPresentationStyle을 동적으로 변경하고 싶습니다. 나는 문 UIModalPresentationPageSheet이 작동하는 경우 modalView회전 후 modalPresentationStyle 변경

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

스크랩을 만들려면 제대로 시작하는이 물품.

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