Is it possible, given a SEL
to generate a string representation of the method it refers to?
For context:
I have an object instance initialized thusly:
-(id) initWithTarget:(id)object action: (SEL)action;
Within the instance I would like to echo the string name of the method referred to by SEL
. How do I do that?
NSStringFromSelector
Conversion in opposite direction is also possible
NSSelectorFromString
Use sel_getName
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With