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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -