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

Objective-C Language Conforming to Protocols


Example

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

@interface NewClass : NSObject <NewProtocol>
...
@end

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>
...
@end

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.