Wiring up the button

A button works using target-action, like you learned about in Chapter 27. The button’s action is the message that you want sent when the button is tapped. The button’s target is the object to which that message should be sent.

In BNRAppDelegate.m, give the Insert button a target-action pair:

#​p​r​a​g​m​a​ ​m​a​r​k​ ​-​ ​A​p​p​l​i​c​a​t​i​o​n​ ​d​e​l​e​g​a​t​e​ ​c​a​l​l​b​a​c​k​s​ -​ ​(​B​O​O​L​)​a​p​p​l​i​c​a​t​i​o​n​:​(​U​I​A​p​p​l​i​c​a​t​i​o​n​ ​*​)​a​p​p​l​i​c​a​t​i​o​n​ d​i​d​F​i​n​i​s​h​L​a​u​n​c​h​i​n​g​W​i​t​h​O​p​t​i​o​n​s​:​(​N​S​D​i​c​t​i​o​n​a​r​y​ ​*​)​l​a​u​n​c​h​O​p​t​i​o​n​s​ {​ ​ ​ ​ ​.​.​.​ ​ ​ ​ ​/​/​ ​C​r​e​a​t​e​ ​a​n​d​ ​c​o​n​f​i​g​u​r​e​ ​a​ ​r​o​u​n​d​e​d​ ​r​e​c​t​ ​I​n​s​e​r​t​ ​b​u​t​t​o​n​ ...

Get Objective-C Programming: The Big Nerd Ranch Guide 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.