Why NSClassFromString(@"Object")
returns Object class?
When I try to ignore it using respondsToSelector
: , i get
NSForwarding: warning: object 0x325ef24 of class 'Object' does not implement methodSignatureForSelector:
-- trouble ahead
NSForwarding: warning: object 0x325ef24 of class 'Object' does not implement doesNotRecognizeSelector:
-- abort
I can insert isEqualToString
for skipping @"Object"
string, but is it an issue or not?
Update:
"Object" is really a class. It have 5 possible selectors: initialize, retain, release, autorelease, class.
It can't be allocated.
If You read documentation You can see that respondsToSelector: is using only with objects. And NSClassFromString returns You calss instead of object. I assume to solve Your issue You need to create object of received class.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments