Protocols let you specify an interface for a method or methods that can be used in multiple classes. For instance, if you have a method named print and want to create a protocol for it, you can do that in a file named, say, printing.h:
@protocol Printing
-(void) print;
@end
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.