I'm working on an iPhone app that uses Core Data. I have only one entity called Books, and that entity has the attributes Title, Author, ISBN, Description and Shelf.
I'm working on the book editing view, and want to have a UIPickerView listing all of the unique Shelf rows so that the user can just pick a shelf.
My question is -- how do I get an NSArray of all of the unique Shelf attributes across all of the books in the database? I have access to the managedObjectContext of the Book being edited, so would I use some sort of a fetch request?
Thanks!