开发者

UITableView reloadData 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜