0
스토리 보드를 사용하여 새로운 탭 응용 프로그램을 생성했습니다.현재 UITabBarController의 모달보기
지금까지 내가 가진
TabBarController -> FirstViewController -> SecondViewController -> ModalViewController 나는 tabBarController를 표시하기 전에 모달 뷰를 엽니 다하기 위해 노력하고있어
. 나는 application:didFinishLaunchingWithOptions:;
- (void)showModalView
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
GSLoginViewController *loginView = [storyboard instantiateViewControllerWithIdentifier:@"loginView"];
[loginView setModalPresentationStyle:UIModalPresentationFullScreen];
[self.window.rootViewController presentViewController:loginView animated:YES completion:NULL];
}
에서
showModalView
가 호출되는 AppDelegate.m에 다음 코드를 추가 그리고 여기에 출력 내가 가진 : AppDelegate에이 없기 때문에
Warning: Attempt to present <ModalViewController: 0x93670d0> on
<UITabBarController: 0x935d170> whose view is not in the window hierarchy!
[여기] [1]에서 답을 찾을 수 있습니다. [1] : http://stackoverflow.com/questions/11862883/whose-view-is-not-in-the-window-hierarchy –