How to I reference a pointer from a different class

Posted by Justagruvn on Stack Overflow See other posts from Stack Overflow or by Justagruvn
Published on 2010-06-17T22:36:30Z Indexed on 2010/06/17 22:43 UTC
Read the original article Hit count: 213

Filed under:
|
|

Hey team of awesomeness!, (Iphone Objective-C question)

First off, I despise singletons with a passion. Though I should probably be trying to use one, I just dont want to. I want to create a data class (that is instantiated only once by a view controller on loading), and then using a different class, message the crap out of that data instance until it is brimming with so much data, it smiles.

So, how do i do that? I made a pointer to the instance of the data class when I instantiated it. I'm now over in a separate view controller, action occurs, and I want to update the initial data object. I think I need to reference that object by way of pointer, but I have no idea how to do that. yes I've set properties and getters and setters, which seem to work, but only in the initial view controller class.

Peace Love applesauce.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about view