Add left padding to UITableView cell

Please refer to the picture below:

Result

I want to customize a UITableView.

I got the background image applied to it using tableView.backgroundView.

Now I want to add a left indent / marker to each line as an example. Then I want to reduce their width and center.

Can I reach these? Any help is appreciated :)

+7
source share
1 answer

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

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

for part of the indentation.

+24
source

All Articles