Buttons in Interface Builder

Buttons appear by default in the IB library as System button objects (see Figure 2-1). To use them, drag them into your interface. You can then change them to another button type via the Attributes inspector (View > Utility > Show Attributes Inspector, Command-Option-4). A button-type pop-up appears at the top of the inspector. Use this pop-up menu to select the button type you want to use.

If your button uses text, you can enter that text in the Title field. The Image and Background pull-downs let you choose a primary and background image for the button. Each button provides four configuration settings. The four button states are Default (the button in its normal state), Highlighted (when a user is currently touching ...

Get The Core iOS Developer’s Cookbook, Fifth 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.