In Cocoa, you can write @selector(mySelectorNameWithObject:) to get a compiled SEL, or at run time NSSelectorFromString(@"mySelectorNameWithObject:") with SEL returned. According to Apple Documentation :
The only thing that makes the name of the selection method different from a simple string is that the compiler guarantees the uniqueness of the selectors.
But I cannot use the SEL object as a string without failing. Is there a way to take SEL and return an NSString object? Basically I am looking for the exact opposite of NSSelectorFromString() .
Thanks in advance.
source share