Custom TableView Cell Indentation Issue
I created a custom UITableViewCell in my app and the default indent when the Delete button is present is not happening, below is a screenshot of my settings. Anyone have any idea as to what I'm doing wrong?
开发者_如何学运维Also, here's a shot of the IB properties:
should happen by default, but in your UITableViewDelegate override
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
make sure you aren't doing anything strange in:
- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
and that you are setting the cell's editingAccessoryType
to UITableViewCellEditingStyleDelete
or UITableViewCellEditingStyleInsert
and that you aren't returning No
from :
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
精彩评论