views:

52

answers:

1

I have 3 different instances of a class and when a user taps a button (there are buttons for each of the instances) I want it to add the text of the button to the NSArray. But the NSArray must contain all 3 different sets of "historys"

Should I be using a singleton, or just keep a reference to the NSArray as a property?

+1  A: 

You could go either way. I would create a singleton if I had more global data I need to share between the objects in my app. If it's confined to only one property than I would probably just hold references to it wherever I needed to access it.

ennuikiller