![]() The cell’s content is pushed toward the right to make room for the editing control. ![]() The editing control can be either a deletion control (a red minus sign inside a circle) or an insertion control (a green plus sign inside a circle). Figure 5-2 Parts of a table-view cell in editing mode When the table view goes into editing mode, the editing control for each cell object (if it’s configured to have such a control) appears on its left side, in the area shown in Figure 5-2. The smaller area on the right side of the cell is reserved for accessory views: disclosure indicators, detail disclosure controls, control objects such as sliders or switches, and custom views. Figure 5-1 shows the major parts of a cell. Normally, most of a cell object is reserved for its content: text, image, or any other kind of distinctive identifier. How to create custom UITableViewCell objectsĪ cell object has various parts, which can change depending on the mode of the table view. How to use the default capabilities of UITableViewCell for setting cell content The table view’s data source provides the cell objects to the table view by implementing the tableView:cellForRowAtIndexPath: method, a required method of the UITableViewDataSource protocol. Cells inherit from the UITableViewCell class. ![]() Next Previous A Closer Look at Table View CellsĪ table view uses cell objects to draw its visible rows and then caches those objects as long as the rows are visible. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |