UIViewController's viewDidAppear not being called after a modal close

你。 提交于 2019-12-04 10:26:04

I just ran in to the same problem.

I solved it by adding a delegate and a delegate method.

So when Controller A opens Controller B as a modal view controller with a page curl i set the instance of controller b's.delegate to be controller a.

In controller B i add this:

-(void) viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];

    if (delegate)
        [delegate didCloseInfoViewController];
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!