whose view is not in the window hierarchy 오류 대처 방법

whose view is not in the window hierarchy

오류가 난다.
EkEventEditViewController 가 ViewController 위에 생성이 되었다고 하면서 나는 오류이다.

혹시나 해서 ViewController 를 NavigationViewController 로 변경해도 마찬가지이다.

UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController;
    while (topController.presentedViewController) {
        topController = topController.presentedViewController;
    }
[topController presentViewController:addEventVC animated:YES completion:nil];

위의 구문을 넣어주면 된다.

댓글

이 블로그의 인기 게시물

한글 2010 에서 Ctrl + F10 누르면 특수문자 안뜰 때

아이폰에서 RFID 사용하는 방법

VCC 와 GND 는 무엇일까?