Skip to content

Instantly share code, notes, and snippets.

@pbrewczynski
Created December 19, 2013 07:20
Show Gist options
  • Save pbrewczynski/8035563 to your computer and use it in GitHub Desktop.
Save pbrewczynski/8035563 to your computer and use it in GitHub Desktop.
id cardObject = [nsArrayThatImSureHaveOnlyCardOBject firstObject];
if([cardObject isKindOfClasss:[CardObject class]]) {
CardObject* castedCardObject = (CardObject *)cardObject; // Cast it ONLY FOR compiler and for hints in xcode.
/* following code, using CardObject instance methods, sure (sure more) that object could answer to that message */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment