NSClassFromString issue

AlKozin

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.

HereTrix

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.

edited at
0

Comments

0 comments
Login to comment

Related