当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - Create table like native Spotlight Search

问题描述:

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?

分享给朋友:
您可能感兴趣的文章:
随机阅读: