iphone - is there a way to define a variable thats accessible to some classes and not others? -
in objective-c, access variables limited 3 types @public , @private , @protected (default) , @package .. these access modifiers allow access variable through 4 situations in order :
1- access variable anywhere.
2- access variable inside class.
3- access variable anywhere in class , subclasses.
4- access variable anywhere in framework.
my question is: there way define variable accessible classes , not others ? (i.e. customised scope variables)
what you're asking c++'s friend keyword. friend classes in objective-c discusses topic.
Comments
Post a Comment