Last active
August 29, 2015 14:02
-
-
Save hlung/cabeec6d5f1a9090c2a8 to your computer and use it in GitHub Desktop.
Calling `-isKindOfClass` on a class object doesn't raise any warning and will give wrong comparison results. We have to use `+isSubclassOfClass:` instead.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSString*)levelName { | |
if ([self isSubclassOfClass:[FGRoom class]]) { | |
return @"Room"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment