O'Reilly logo

Objective-C Fundamentals by Collin Ruffenach, Johannes Fahrenkrug, Christopher K. Fairbairn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Protocols

 

This chapter covers
  • Protocol overview
  • Defining protocols
  • Conforming to a protocol
  • Looking at examples of commonly used protocols

 

Now that you have some experience creating standard and custom objects, you need to look at how these objects interact. If two objects are to work together, you need to make sure they know how to talk to each other. For objects to talk to each other, they need to know what conversation they’re having. The conversation between objects is usually represented by the protocol design scheme.

Sometimes when you create a class, you design it to be used as a tool for some other class. If you’re going to do this, two things must be in place. First, your object must have a way to send callbacks ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required