开发者

Objective-C: updating UITableView with recursive function?

开发者 https://www.devze.com 2022-12-26 07:58 出处:网络
I am trying to re-call core-data in UITable using model view. I amin UITablein- (void)viewDidLoadmethod usinggetting some data from internet and setting them entities and showing them on UITable.It wo

I am trying to re-call core-data in UITable using model view. I am in UITable in - (void)viewDidLoad method using getting some data from internet and setting them entities and showing them on UITable.It works normal ,but Now I am trying to use new addModel view and in this model view I can type user name in textfield and save it in person entity.But when model view disappears my table not updates,after re-lunching it updates but because of not running vievDidLoad again it doesn`t gets value form internet.

i thought that am I have to use some recursive function? But where must 开发者_JAVA技巧I put it?in UITable which function calls every time?


NSFetchedResultsController, the iPhone equivalent of NSArrayController, is probably what you need. As the docs say NSFetchedResultsController

optionally monitors changes to objects in its associated managed object context, and reports changes in the results set to its delegate (see “The Controller’s Delegate”).

so it should respond when you update an entity.

0

精彩评论

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