O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

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

Improving the Storyboard: Take 1

Most apps have some need to exchange data with and/or trigger behaviors in other objects. Doing so can lead to interdependent code that is hard to maintain and reuse. Instead, you can use protocols.

Protocols increase the maintainability, reusability, and flexibility of your code. You can think of a protocol as a contract between a requestor and a provider. The provider, or delegate as it is usually called, agrees to implement a set of methods that the requestor can call. Each method is usually used for one of three purposes:

Image To request data from the delegate, such as a Car object

To inform the delegate of a ...

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