开发者

Core Data - Calculated Fields

开发者 https://www.devze.com 2022-12-24 23:55 出处:网络
I Know how to use core data with UITableview but how can I use the NSFetchedController to get calculated fields. Is there an example I can follow? LIke i want to go through all the NSManagedObjects an

I Know how to use core data with UITableview but how can I use the NSFetchedController to get calculated fields. Is there an example I can follow? LIke i want to go through all the NSManagedObjects and then add its "mark" field but can this be d开发者_如何学Cone in easier way or do I have to do it all manually.

Thanks


Your question is a bit unclear. Do you want to fetch based off of a calculated field?

If you want to fetch off it, then you need to store the calculated/derived value in the object model and then you can recalculate it whenever one of its relevant attributes changes. That is the cleanest way to do it.

If you want to do something else then please edit your question and clarify.

0

精彩评论

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