2010-07-27 4 views
0

나는 내 응용 프로그램에서 다음과 같은 계층 구조를 가지고 :UIImagePickerController를 소스 (카메라)를 보여줍니다 빈 화면

UINavigationController 
    |__ UITabBarController 
      |__ UINavigationController 
        |__ ViewProfilePhotoController (*presentModalViewController:picker is done here) 

내가 취소하고 내가 얻을 ViewProfilePhotoController 내 UIImagePickerController를 해고 누를 때 내가 가진 문제 ViewProfilePhotoController (실제 사진) 안에 표시 할보기가 아닌 상태 표시 줄 만있는 빈 화면.

응용 프로그램 계층 구조에서 UITabBarController를 꺼내서 동일한 코드를 시도했기 때문에이 문제가 발생하지 않으며 모든 것이 예상대로 작동하므로이 동작이 실제로 이상합니다. 모든 대리인이 ViewProfilePhotoController에 제대로 구성되어 있고 몇 시간 동안 고치려고했습니다.

또한 UIImagePickerController 내에서 가능한 모든 구성을 확인하고 오른쪽 부모보기를 설정하여 지금까지 아무 것도 작동하지 않았습니다.

나는 또한 적절하게 계단식으로 만들려고했다. - viewWillAppear - viewWillDisher는 계층 구조를 내려 놓고 여전히 운이 없다.

어떤 통찰력이라면 크게 감사하겠습니다. 고맙습니다

답변

0

오케이 너무 많은 시간 후에 기록을 위해 나는 해결책을 발견했습니다.

In my rootController UINavigationController I was adding 2 UIViewControllers to the navigation stack and then after the authentication happened I did the following to add my UITabBarController:

[self.navigationController initWithRootViewController:theTabController]; 

I 번째의 UIViewController에서 rootViewController로 UITabController을 첨가하고,이 UIImagePickerController를 좋아하지 않는

및 탐색에이어서 나중에 첨가하는 경우. 흰색 화면을 벗어나면 기각됩니다.

대신. ....

이 내 솔루션입니다

- (void) authSucceded { 

     [self createTabBarController]; 

     self.theTabController.view.tag = 2345; 
     [self.view addSubview:self.theTabController.view]; 
} 

짜잔 : 내 AppDelegate에 비록 내 스택의 루트의 UIViewController라는이 같은 UITabBarController가 추가

관련 문제