views:

371

answers:

1

When you enter editing mode on a grouped-style UITableView, the cells indent to show the editing control (if you aren't sure what I mean, see this picture (editing mode) http://i.imgur.com/GJXvL.png and this (non-editing mode) http://i.imgur.com/ahKYS.png).

I am trying to manually indent a cell when the tableView is not in editing mode. I tried the indentationLevel property, but that just moves the text further to the right inside the cell and doesn't actually change the cell.

Any ideas?

A: 

I can't access imgur.com right now so this is my best guess.

I guess you add all subviews to cell.view instead of cell.contentView. You should try adding them to cell.contentView.

If you subclass the UITableViewCell, you should override layoutSubviews to adjust all subviews according to cell.contentView.bounds.

Hope this works.

iwat