I know how to create a SEL
at compile time using @selector(MyMethodName:)
but what I want to do is create a selector dynamically from an NSString
. Is this even possible?
What I can do:
SEL selector = @selector(doWork:);
[myobj respondsToSelector:selector];
What I want to do: (pseudo code, this obviously doesn't work)
SEL selector = selectorFromString(@"doWork");
[myobj respondsToSelector:selector];
I've been searching the Apple API docs, but haven't found a way that doesn't rely on the compile-time @selector(myTarget:)
syntax.