Skip to content

Instantly share code, notes, and snippets.

@Arclite
Created June 23, 2010 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arclite/449578 to your computer and use it in GitHub Desktop.
Save Arclite/449578 to your computer and use it in GitHub Desktop.
//For classes introduced in iPhone OS 3.2, you can use the NSClassFromString function to see if the class is defined. If the function returns a non-nil value, you may use the class. For example:
Class splitVCClass = NSClassFromString(@"UISplitViewController");
if (splitVCClass)
{
UISplitViewController* mySplitViewController = [[splitVCClass alloc] init];
// Configure the split view controller.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment