码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2014-12-15 00:06:25      阅读:355      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   ar   os   使用   sp   on   

本文转载至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

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

标签:style   blog   http   io   ar   os   使用   sp   on   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!