Typedef enum {
UITableViewCellSelectionStyleNone,
UITableViewCellSelectionStyleBlue,
UITableViewCellSelectionStyleGray
} UITableViewCellSelectionStyle
// Cell button format on the right
Typedef enum {
UITableViewCellAccessoryNone, // don't show any accessory view
UITableViewCellAccessoryDisclosureIndicator, // regular chevron. doesn't track
UITableViewCellAccessoryDetailDisclosureButton, // blue button w/chevron. tracks
UITableViewCellAccessoryCheckmark // checkmark. doesn' t track
} UITableViewCellAccessoryType
// Whether to add a line break
Typedef enum {
UITableViewCellSeparatorStyleNone,
UITableViewCellSeparatorStyleSingleLine
} UITableViewCellSeparatorStyle // change the line feed color
 
 
 
1. After clicking a cell, the system will enter another View and return to the top of the original View. How can we return the position before clicking?
 
NSIndexPath * ip = [NSIndexPath indexPathForRow: row inSection: section];
 
[TopicsTable selectRowAtIndexPath: ip animated: YES scrollPosition: UITableViewScrollPositionNone];
 
2. Select the Cell to respond to the event
 
-(Void) tableView :( UITableView *) tableView didSelectRowAtIndexPath :( NSIndexPath *) indexPath {
 
[TableView deselectRowAtIndexPath: indexPath animated: YES]; // The selected return color disappears instantly
 
}
 
3. In a program, sometimes users do not want to click a line. You can do this:
 
-(NSIndexPath *) tableView :( UITableView *) tableView willSelectRowAtIndexPath :( NSIndexPath *) indexPath {
 
NSUInteger row = [indexPath row];
 
If (row = 0) return nil; // prevents the first row from being selected
 
Return indexPath;
 
}
 
4. Move the cell to check whether the del button appears.
 
-(BOOL) tableView :( UITableView *) tableView canEditRowAtIndexPath :( NSIndexPath *) indexPath {
 
 
}
 
5. Editing status
 
-(Void) tableView :( UITableView *) tableView commitEditingStyle :( UITableViewCellEditingStyle) editingStyle forRowAtIndexPath :( NSIndexPath *) indexPath {
 
[TopicsTable setContentSize: CGSizeMake (0, controller. promiseNum * 44)];
 
}
 
6. Add an index table to the right
 
-(NSArray *) sectionIndexTitlesForTableView :( UITableView *) tableVIew {
 
 
 
}
 
7. Return the TITLE section.
 
-(NSString *) tableView :( UITableView *) tableView titleForHeardInSection :( NSInteger) section {
 
}