开发者

UITableView reloadData from a different controller

开发者 https://www.devze.com 2023-03-23 19:29 出处:网络
Well , my problem is exactly like this one : Call reloadData on a UITableView from a different controller

Well , my problem is exactly like this one :

Call reloadData on a UITableView from a different controller

The correct answer said that i've to get a pointer back to m开发者_如何学运维y controller . I've no idea how to do it .


You can use Dependency injection, and inject a reference to your controller from your other controller.

So whenever you create your other Controller, have an ivar on that so that you can set a reference to your other controller. So for example:

 [myNewController new];
 [myNewController setController:oldContorller];
0

精彩评论

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