开发者

NSNotificationCenter and UITabBar app

开发者 https://www.devze.com 2023-03-24 13:50 出处:网络
Here\'s my problem: I have an app. It\'s based on four UITabBar views. On view 3 something happens and notification is being sent to NSNotificationCenter. There\'s an observer in view 1, which waits

Here's my problem:

I have an app. It's based on four UITabBar views. On view 3 something happens and notification is being sent to NSNotificationCenter. There's an observer in view 1, which waits for said notification to first load some data from a local file (which were saved to the file before posting the notification) and then update a UITableView -> [TableView reloaddata]. So... i added nslogs to the observer and notification and they fire, b开发者_StackOverflow中文版ut the UITableView is not updated when i switch to view 1 (when i restart the app, all is fine).

What can go wrong?

Btw. updating of view 1 is supposed to happen while view 3 is currently present.

Any help is appreciated!


Simply put a [tableView reloadData] into your -(void)viewDidAppear:(BOOL)animated method of the ViewController.

0

精彩评论

暂无评论...
验证码 换一张
取 消