What's the best way to have functions share an array in Objective-C?

Posted by editor on Stack Overflow See other posts from Stack Overflow or by editor
Published on 2010-05-02T06:00:54Z Indexed on 2010/05/02 6:07 UTC
Read the original article Hit count: 113

Filed under:
|
|

I understand that in Objective-C you declare an array in the header file and interact with it in a class. So far I'm adding things and fetching them fine within a single function. I'm new to the language however and can't figure out how to share that array across other functions.

I'd like to initialize array data in my viewDidLoad and access it from various functions later on. Is this possible and if so what's the best way to do it?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone