Graphics Programs Reference
In-Depth Information
This cell needs to display three text elements and an image, so drag three UILabel s and
one UIImageView onto the cell. Configure them as shown in Figure 15.4 . Make the text
of the bottom label a little smaller and a dark shade of gray.
Figure 15.4 HomepwnerItemCell's layout
While this cell has a specified width and height in the XIB file, we don't know what the
actual width and height will be in the application. Since our application will run on the
iPhone and on the iPad (in both portrait and landscape orientations), the cell will need to
adjust horizontally to fit the window it is on. Thus, you must set the autoresizing mask for
each subview. In the size inspector, change the subviews' autoresizing masks to what is
shown in Figure 15.5 .
Figure 15.5 Autoresizing masks for HomepwnerItemCell
When the cell resizes horizontally (which it will depending on the orientation and the
device), the label on the righthand side will stay fixed to the righthand side. The rest of the
subviews will stay fixed to the lefthand side, and the two labels in the center will grow
wider.
Figure 15.6 Changing the cell class
 
 
 
Search WWH ::




Custom Search