views:

15

answers:

1

Hello, I have a problem in my iPhone application. I created an application in which I have 2 views and their respective controllers. The variables declared in the first view but not visible in the second and the same for the second. It can create a "controller" that allows you to manage two views of variables making share so? Thank you and if something is not clear just ask.

A: 

You can set up global variables either in the App Delegate or in a Singleton and that way you can share variables between any number of view controllers.

Rob

p.s. a good article to read: http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html

iWasRobbed