问题描述:

I want to create a table with cells just as in Settings->General->Spotlight Search.

Basically, the user touches the three white stripes on the right to drag and drop a cell.

I had a look at http://www.raywenderlich.com/63089/cookbook-moving-table-view-cells-with-a-long-press-gesture but in this case, the user has to long press and can touch any part of the cell to move.

Any help about creating a similar view as in Spotlight Search?

网友答案:

try with this code

-(BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath         
 {
   return YES;
 }

see this for more details How to make UITableView rearrangeable?

相关阅读:
Top