Hour 12. Routing Messages with Selectors

What You’ll Learn in This Hour

Understanding the Target-Action Pattern

Using SEL and @selector

Invoking Selectors with NSInvocation

Managing Messages with Runtime Tools

Getting Inside Objective-C Messages

By now, you should be familiar with Objective-C being described as being a dynamic messaging environment, and you have seen examples of messages in Hour 3, “Using Object-Oriented Features in Objective-C,” and in Hour 6, “Exploring Messages.” This hour looks inside the messages to see how they work. Because this is the heart of Objective-C and also because this is a significant way in which it differs from many other object-oriented programming languages, it is worthwhile to spend some time on ...

Get Sams Teach Yourself Objective-C in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.