Chapter    4

The First Call to Action

It really is amazing all the stuff we get free with Cocoa, as we saw in the last two chapters. But there was something very important missing in the first two applications that most applications will need: the ability to interact with the user. When we were in Interface Builder in the last chapter, we saw that there was a whole library filled with objects like text fields and buttons that we can use to assemble our interface, but those user-interface objects are no good if we can’t tell when they’re used or change the data they contain. In this chapter, we’ll see how those objects can be used to let users interact with our application—via the object’s outlets and actions.

Declaring Outlets and Actions

Get Learn Cocoa on the Mac, Second Edition 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.