jeudi 25 juin 2015

Predicates and combined filters in core data?

I'm not using Core Data currently, but I'm about to switch to it from Realm, if I'm sure a certain thing will work, which is vital to the way my application currently works. I have a model with two objects:

Message:
date - NSDate
text - String
images - One-to-many > Image

Image:
imageURL - String
message - Many-to-one > Image

I have a table view which displays both Images and Messages. I need to know what should go at a certain index path, for when UITableView wants to know. So I need to be able to perform a query akin to:

"Give me an ordered list of images and messages, messages sorted by their date and images sorted by their message.date".

How could I do this?

See more ..

Aucun commentaire:

Enregistrer un commentaire