Add left indent to UITableView cell

ios, uitableview

Solution

You could use a transparent view for your cells and center your content inside that cell. Or you can use

- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath

for the indentation part.

Problem

Please refer to this picture below: I want to customize a UITableView. I achieved applying image background for it using tableView.backgroundView. Now I want to add left indent/margin to every row as the example picture. Then I want to reduce their width and centerize them. Could I achieve these? Any help is appreciated :)

Original source

Related problems