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
Post a Comment