views:

16

answers:

1

Hello everybody!!

I'm new to Stack Overflow and have my first question. I want to develop an application with a timetable. I've one UITableViewController and one CoreData entity called 'SchoolClass'. With arrow buttons I can switch between the days of a week. My problem is that I want to have all classes in the entity 'SchoolClass'. When I fetch the data I set the sectionNameKeyPath to 'day'.
But how can I use only one section that the UITableViewController only shows the classes of one day?

I hope you can help me!
And sorry for my bad english!! :)
qPaul

+1  A: 

By using NSPredicate

A Fetch Request is a self-contained query which is sent to the Managed Object Context. The Context evaluates the request and returns the results in the form of an NSArray.

The only thing a Fetch Request must have is an Entity. If you send a fetch request to the Context with only an Entity, you'll get an array of all known instances of that Entity.

You can supply a Predicate if you want to only return instances that match certain criteria.

You should visit this tutorial by Cocoadevcentral.

Henrik P. Hessel