I have an NSMutableArray
in my app delegate. I wish to use that mutable array in a different class in my program, as if it were a global variable. How would I do this?
Is it as simple as importing the header and referencing the object?
I have an NSMutableArray
in my app delegate. I wish to use that mutable array in a different class in my program, as if it were a global variable. How would I do this?
Is it as simple as importing the header and referencing the object?
Make you array a property of your delegate as Sean said
Then access the array like this :
Take advantage of the UIApplication singleton:
Then, access your array property like this:
appDelegate.yourArrayProperty