Graphics Programs Reference
In-Depth Information
UITableViewCells
A
UITableViewCell
is a subclass of
UIView
, and each row in a
UITableView
is a
UITableViewCell
. (Recall that a table in iOS can only have one column, so a row only
has one cell.) The
UITableViewCell
s are subviews of the
UITableView
.
the superview for the content of the cell. It also can draw an accessory indicator. The ac-
cessory indicator shows an action-oriented icon, such as a checkmark, a disclosure icon, or
a fancy blue dot with a chevron inside. These icons are accessed through pre-defined con-
stants for the appearance of the accessory indicator. The default is
UIT-
ableViewCellAccessoryNone
, and that's what we'll use in this chapter. But you'll
see the accessory indicator again in
Chapter 15
. (Curious now? See the reference page for
UITableViewCell
for more details.)
Figure 9.12 UITableViewCell layout
The real meat of a
UITableViewCell
is the three subviews of the
contentView
.
Two of those subviews are
UILabel
instances that are properties of
UIT-
ableViewCell
named
textLabel
and
detailTextLabel
. The third subview is a
tLabel
.
Figure 9.13 UITableViewCell hierarchy