Created
June 18, 2012 23:51
-
-
Save wjlafrance/2951508 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Class newClass = NSClassFromString(@"UINewClassThatYouCantHave"); | |
if (newClass) { | |
NSLog(@"We're on an iOS that has the new class"); | |
id newObject = [[newClass alloc] init]; | |
if ([self respondsToSelector:@selector(selectorThatUsesNewObject:)]) | |
[self performSelector:@selector(selectorThatUsesNewObject:) withObject:newObject]; | |
} else { | |
NSLog(@"Class doesn't exist!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment