background image
3.
Notice how in Figure 4-3 the icons have labels. If you do not see labels, choose View Icons & Labels from
the gear menu at the bottom of the window. This will make it easier to locate the objects you are looking
for.
4.
Place a text field in the Currency Converter window.
Find the Text Field item (shown highlighted in Figure 4-3) and drag the Text Field object from the library
to the top-right corner of the window. Notice that Interface Builder helps you place objects according
to the Apple human interface guidelines by displaying layout guides when an object is dragged close
to the proper distance from neighboring objects or the edge of the window.
5.
Increase the text field's size so that it's about a third wider.
Resize the text field by grabbing a handle and dragging in the direction you want it to grow. In this case,
drag the left handle to the left to enlarge the text field, as shown in Figure 4-4.
Figure 4-4
Resizing a text field
6.
Add two more text fields, both the same size as the first.
There are two options: You can drag another text field from the palette to the window and make it the
same size as the first one, or you can duplicate the text field already in the window.
To duplicate the text field in the Currency Converter window:
a.
Select the text field, if it is not already selected.
b.
Choose Duplicate (Command-D) from the Edit menu. The new text field appears slightly offset from
the original field.
c.
Position the new text field under the first text field. Notice that the layout guides appear and Interface
Builder snaps the text field into place.
d.
To make the third text field, press Command-D again.
As a shortcut, you can also Option-drag the original text field to duplicate it.
30
Creating the Currency Converter Window
2007-10-31 | © 2007 Apple Inc. All Rights Reserved.
CHAPTER 4
Defining the View: Building the User Interface