2012-10-20 4 views
0

다른 UIViewController의 모달 형식으로 UINavigationController의 rootview를 표시하려고합니다. 그러나 모달 전환을 트리거하는 단추를 클릭하면 비어있는 UINavBar 빈 화면이 나타납니다. 나는 UINavigationController에 뷰를 첨부하지 않을 것이라고 생각하지만 정확히 어떻게하는지 잘 모르겠습니다.ModalViewController 내에서 UINavigation Controller 사용시의 문제

다음은 모달 전환을 트리거 할 것으로 예상되는 target-action 메서드에 대한 코드입니다. 이 코드는 모달 표현 자의 구현 파일에 포함되어 있습니다.

//Instansiate the root UIViewController 

     OzSoundSelectionViewController *selectionView = [[OzSoundSelectionViewController alloc]initWithNibName:@"OzSoundSelectionViewController" bundle:nil]; 

//Instansiate the UINavigatonController and set the root view controller 

     navigationController = [[UINavigationController alloc]initWithRootViewController:selectionView]; 

//Set up the modal transition 
     [selectionView setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; 
     [self presentModalViewController:navigationController animated:YES]; 

답변

0

나는이 문제를 파악했습니다.

navigationController라는 rootViewController에서 속성을 선언했습니다. 이것은 UIViewController 부모 클래스의 일부인 navigationController 속성을 오버라이드합니다. 그것은 모든 것을 망 쳤어.