Say I am in a myClass.m
I know I can do:
SEL aSelector = @selector(methodName);
I can latter do NSStringFromSelector(@selector(Bookmark)), for example.
Here, methodName is a selector for myClass.
Say I have a property named myProperty of type myPropertyClass and that class have a selector myPropertymethodname
How should I access it if say I want to express that selector using string.
Basically sometimes we want to use valueForKey rather than accessing the accessor directly. However, that’s prone to mistyped. I want to use NSStringFromSelector instead
SEL aSelector = @selector(myPropertyClass.myPropertymethodname);
Doesn’t work.
For the property’s default named getter:
For the property’s default named setter:
Then just ensure the selector/property declaration is visible in the file you are compiling.
Note that a selector’s name cannot be scoped-qualified to a specific class.