I have a counter which I use to get an object at that counters index and I need to access it in another class.
How are static variables declared in Objective C?
I have a counter which I use to get an object at that counters index and I need to access it in another class.
How are static variables declared in Objective C?
Rather than make it global, give one class access to the other class's counter, or have both classes share a third class that owns the counter:
Hi alJaree,
You declare a static variable in the implementation of Your class and enable access to it through static accessors: