Created
December 29, 2010 05:57
-
-
Save edwardinubuntu/758236 to your computer and use it in GitHub Desktop.
newDocument conformsToProtocol
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
-(BOOL) addDocument:(id) newDocument { | |
if ( [newDocument conformsToProtocol:@protocol(Document)]){ | |
// add the document... | |
returnYES; | |
} else | |
return NO; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment