开发者

use of Core Data and Array in iOS Table View application

开发者 https://www.devze.com 2023-03-13 16:29 出处:网络
looking at the example of Core Data and UITableView within the Apple developer guide, it shows how to load entity from Managed Context into an array开发者_StackOverflow, and then (as it is in all the

looking at the example of Core Data and UITableView within the Apple developer guide, it shows how to load entity from Managed Context into an array开发者_StackOverflow, and then (as it is in all the tutorials out there) the table controller normally getting elements by looking at position in such array. I am asking, if this is the normal way of dealing with the subject (CoreData + Table), it would be nice for example to ask for entities directly to the managed context.

And if such things could be possible for all the entities in the context, would it be possible within a subset, for example as a result of a query, or an order by ?

thanks


Have you looked at NSFetchedResultsController? I It's designed to make tables and Core Data play together nicely.

0

精彩评论

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

关注公众号