-(void)viewWillAppear:(BOOL)animated 不调用 [英] -(void)viewWillAppear:(BOOL)animated doesn't called
本文介绍了-(void)viewWillAppear:(BOOL)animated 不调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序是基于我的应用程序的视图,我编写的视图将出现在一个视图中,但不会调用此方法.我的代码是
My application is view based in my app in one view i write view will appear but this method doesn't call. My code is
-(void)viewWillAppear:(BOOL)animated
{
NSLog(@"view will Appear");
[tableView reloadData];
}
谁能告诉为什么没有调用 viewWillAppear 方法.
Can anyone tell why viewWillAppear method not called.
对不起,我忘了告诉你这个方法第一次调用但是当我从这个视图中删除一个子视图时 viewWillAppear 没有被调用.请建议我如何解决这个问题.
Sorry I forgot To tell You That This method call first time but when i remove a subview from this view viewWillAppear not called. Please Suggest me how to solve this problem.
推荐答案
你好,我做了
[self.view addSubview:viewcontroller.view];
我用过这个:
[self presentModalViewController:viewcontroller animated:YES];
现在我的问题解决了,写这个方法.
and write this method now my problem is solved.
-(void)viewWillAppear:(BOOL)animated
{
NSLog(@"==========view will appear");
}
这篇关于-(void)viewWillAppear:(BOOL)animated 不调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文