Hour 11. Declaring Actions in an Interface File

What You’ll Learn in This Hour

Comparing actions and methods

Creating actions with Xcode

Exploring the difference between iOS and Mac OS X actions

Introducing Actions

Hour 10, “Declaring Methods in an Interface File,” covered the basics of declaring methods. There is a great deal of flexibility in the Objective-C method declaration structure, and you can use it to make your code easy to read and reuse (not to mention easy for users to use). In this hour, you learn how to create and use actions—a special type of method that is a key part of the Cocoa frameworks. Actions make it possible to connect interface elements such as buttons and menu commands to code that is triggered when the action ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.