ios - Passing managed object from app delegate to a VC that is not RootVC -


i have navigation controller who's initial view view controller button push segue tableviewcontroller. i'm wanting pass managed object context appdelegate tableviewcontroller.

i'm using storyboard layout so:

(navigation controller > viewcontroller) > tableviewcontroller

i tried referencing tableviewcontroller using array of view controllers held in navigation controller. navigation controller saying has 1 vc. (not 2)

do first have pass initial vc , pass initial vc tablevc using prepare segue?

what practical way of passing managed object context app delegate view controller not root view controller? can't figure out.

if appdelegate has reference 'navigation controller' can use:

myappdelegate *appdelegate= (myappdelegate *)[[uiapplication sharedapplication] delegate];  appdelegate.navigation.tableobject = .. 

otherwise need pass vc navigation down uitableviewcontroller.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -