ios - Passing an NSManagedObjectContext to a tableview when its embedded in navigation controller -


i'm creating application few tableviews , have first screen normal view, im creating in appdelegate nsmanagedobjectcontext , passing other views using example:

picktypeviewcontroller *controller = (picktypeviewcontroller *)segue.destinationviewcontroller; controller.managedobjectcontext = self.managedobjectcontext; 

but embedded tableview in navigation controller (editor-emmbed in -navigation controller) , want transfer nsmanagedobjectcontext tableview dont know how send through navigation controller.

the table view controller topviewcontroller of navigation controller, can this:

uinavigationcontroller *nav = segue.destinationviewcontroller; mytableviewcontroller *tvc = nav.topviewcontroller; tvc.managedobjectcontext = self.managedobjectcontext; 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -