@eJames and @Diederik are both correct. However, there are several other options, some of which may be preferred depending on your taste.
For example, instead of checking for equality of class objects, you can also use -isMemberOfClass: which excludes subclasses, while -isKindOfClass: and -isSubclassOfClass: none. (This is definitely the case when one option may be more intuitive for some people than for others.)
In addition, [SomeClass className] or [anObject className] are convenient, shorter ways to get the class name as NSString . (I know -className defined in NSObject, and +className works for class prototypes, although I cannot find documentation for it easily.)
source share