Use Interface Builder to configure the
SubscribeController.xib file and create the user
interface. Although the provided XIB file is already configured, you can walk through the steps to see how to create the interface.
- Click the SubscribeController.xib file to reveal a view of the (presently empty) screen in the right pane and the following three items represented by icons in the middle pane:
- File's Owner – the object that is set to be the owner of the user interface, which is typically the object that loads the interface. In this tutorial, this is the SubscribeController.
![File's Owner icon](../image/penmqu1264552545173_49-eka1321395633493.image)
- First Responder – the first responder proxy object handles events. Connecting an action to the first responder means that when the action is invoked, it is dynamically sent to the responder chain.
![First Responder icon](../image/penmqu1264552545173_49-eka1321395666589.image)
- View – displayed in a separate window to allow you to edit it.
![View icon](../image/penmqu1264552545173_49-eka1321395691450.image)
- Select the
File's Owner icon, click View
in the utility area, click Show the Identity Inspector,
and make sure SubscribeController appears in the
Class field under Custom
Class.
This tells Interface Builder the class of the object to allow you to make connections to and from the File's Owner.
- Click the View icon, and in the Identity Inspector panel, and make sure UIView appears in the Class field under Custom Class.
- To create a Subscribe button, select .
- In the Object Library panel, select the Round Rect Button item, drag it onto the view.
- Double-click it and enter Subscribe and press Return.
- In the Accessibility section of the Identity Inspector, make sure Enabled is unselected.
Disable the button because the application cannot subscribe to the server for
updates until it is connected.
![Accessibility options](../image/penmqu1264552545173_49-eka1321397685734.image)
- Control-click the Subscribe button to show the inspector.
- Drag from the circle to the right of Touch Up Inside to the File's Owner icon and release, then click on buttonPressed to establish a connection between the Subscribe button and the button's action method: