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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take advantage of the UIApplication singleton:
Then, access your array property like this:
appDelegate.yourArrayProperty