Note: IBAction
is a constant (defined as void
) that
is used to tell Xcode to treat a method as an action for target-action connections.
The sender
parameter in the action method is the object that invoked the action method. It’s common for a receiving object to first check which object sent the message and possibly
query that object for more information before performing an operation. (In this tutorial, the sender of the mute:
method is the button but the sender of the takeFloatValueForVolumeFrom:
method
could be either the text field or the slider.)
//===========
Note: IBOutlet
is
a constant that is used only to tell Xcode to treat the object as an outlet. It’s actually defined as nothing, so it has no effect at compile time.
Also, you added the following code lines to AppDelegate.m
to synthesize these properties (a process that creates the corresponding get and set methods):
@synthesize textField; |
@synthesize slider; |