当前位置:首页 > 操作系统 > Ios

iOS开发 viewWillAppear:(BOOL)animated真机调试的时候不执行了怎么办

本文转载至http://blog.sina.com.cn/s/blog_a843a8850101e0g7.html

 
现在需要的.h文件里面加上。
然后,在需要的.m文件按里面加上关键代码:
self.navigationController.delegate=self;
再去此时navigationController的代理函数,就可以了。
-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [viewController viewWillAppear:animated];
}
-(void) viewWillAppear:(BOOL)animated{
    
    NSLog(@"又能成功使用了。");
}
这是其中一个办法。我认为比较合理,就采用了。
灵感来源于http://www.cnblogs.com/zxtx/articles/1806127.html

原文:http://www.cnblogs.com/Camier-myNiuer/p/4163950.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!