Jesse Bunch
Jesse Bunch

Reputation: 6679

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?

alt text

Also, here's a shot of the IB properties:

alt text

Upvotes: 0

Views: 1174

Answers (1)

Grady Player
Grady Player

Reputation: 14549

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

Upvotes: 4

Related Questions