开发者

Custom TableView Cell Indentation Issue

开发者 https://www.devze.com 2023-01-16 09:24 出处:网络
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

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?

Custom TableView Cell Indentation Issue

开发者_如何学运维

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

Custom TableView Cell Indentation Issue


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
0

精彩评论

暂无评论...
验证码 换一张
取 消