iphone - Passing variables bewteen view controllers -


i've app keep 4 variables in first view controller. second view controller, pushed through navigation controller, should send these variables web form.

so need these 4 vars in second view controller.

at moment, in 1st view controller set vars in app delegate with:

mydelegate *delegate = (mydelegate *) [[uiapplication sharedapplication] delegate]; delegate.var1 = var1; delegate.var2 = var2; [...] 

and when need them in second view controller, i'll them through delegate. probably, wrong way.

how can transfer vars between controllers? what's best way?

declare properties these variables in second view controller , then, when create second view controller , before push navigation stack, assign values properties.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -