Looking for objective-c Answers? Try Ask4KnowledgeBase
Looking for objective-c Keywords? Try Ask4Keywords

Objective-C Language Conforming to Protocols


The following syntax indicate that a class adopts a protocol, using angle brackets.

@interface NewClass : NSObject <NewProtocol>

This means that any instance of NewClass will respond to methods declared in its interface but also it will provide an implementation for all the required methods of NewProtocol.

It is also possible for a class to conform to multiple protocols, by separating them with comma.

@interface NewClass : NSObject <NewProtocol, AnotherProtocol, MyProtocol>

Like when conforming to a single protocol, the class must implement each required method of each protocols, and each optional method you choose to implement.