views:

34

answers:

1

Is there a way to access the value of a variable of another class in the iphone whithout using the delegate?

+1  A: 

you should be able to access the variable if you write a getter method or if you synthesize the variable in the implementation.

See listing 5.2 in this document from Apple for an example. http://developer.apple.com/mac/library/iPad/index.html#documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html

Travis
did that but it returns null when called by another class
alecnash
@alecnash: Then you're doing it wrong somehow.
Chuck
did it with singleton thanks though
alecnash