简体   繁体   English

表reloadData未调用

[英]table reloadData not called

I have a viewcontroller which contains a tableview. 我有一个包含tableview的viewcontroller。 I call another view via pushViewController. 我通过pushViewController调用另一个视图。 When I get back to my original viewController I hope to redraw the table, but viewWillAppear is never called. 当我回到原来的viewController时,我希望重绘表,但是从未调用过viewWillAppear。

Any other ideas? 还有其他想法吗?

I've used this in my own projects with success. 我已经在自己的项目中成功使用了它。

-(void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [[self tableView] reloadData];
}

Double check the spelling of the method. 仔细检查该方法的拼写。

I had two classes competing for messages, UITabbarcontroller and UINavigationController. 我有两个类在争夺消息,分别是UITabbarcontroller和UINavigationController。 I had a UITabBar from a previous experiment. 我从先前的实验中获得了一个UITabBar。 It was created but not used. 它已创建但未使用。 The messages where getting to UITabBarController, and UINavigationController was never told. 从未告知到达UITabBarController和UINavigationController的消息。

Hope this solution will help someome someday 希望这一解决方案有一天能有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM