I want to sort a list without indenting the cells

Discussion in 'iOS Programming' started by caldwelljason, Sep 18, 2008.

  1. caldwelljason macrumors member

    Jul 9, 2008
    I am trying to enable my users to sort a list of items. The only way to get the grabber bars in a UITableView is to set it into edit mode.

    Problem is, in edit mode--even when I tell it I don't want to allow deletes--the list allocates space on the left side for the delete icon. So I have a big dead zone on the left off my list.

    The list is in grouped mode, if that matters.

    How can I get into a state that will allow me to reorder, without allocating delete-icon space?

    I have tried setting the showsReorderControl flag on my cells, but that doesn't seem to do anything if I don't enter edit mode. And 'canMoveRowAtIndexPath' doesn't get called unless the table is in edit mode.
  2. joshperry macrumors newbie

    Oct 5, 2008
    I imagine you found this already, but take a look at

    - (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath;
    on the UITableViewDelegate protocol...

Share This Page