O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

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

Delegation

Delegation at its root is a very simple concept. You can make dinner all by yourself or you can delegate the cooking to your deadbeat friends lazing on the couch. You can buy all the party supplies yourself or you can delegate buying the drinks to your brother and getting the decorations to your sister. You can build an app all by yourself or you can delegate the user interface to your designer friend while you code under the hood.
Delegation on the iPhone OS is no different. Rather than creating a single class with many responsibilities, you can share responsibility among several classes. Delegation makes classes more reusable and maintainable. Many UIKit classes allow customization of their behavior via delegation.
A delegate ...

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