views:

20

answers:

0

Hi, I am fairly new to this, so please bare with me, my core data model look like this 2 entities with the 1st TableViewController displaying the districts, and when user selected the district, it pushes to the 2nd view and display the schools in that district. I have the 1st TableViewController with the NSFetchedResultController setup and display correctly entityForName @"District" , but I am currently stuck and failing on pushing the data to the 2nd view controller which has a custom table cell controller.

District
name
province
__
schools <--- to-many relationship ---->> indistrict

School
name
phone
image
__
indistrict <<--- to-one relationship ---> schools

It would be great if anyone could show me the code example on how to pass the data to the 2nd view controller. Much appreciated~