ios - Reordering UITableView without reorder control -


i need user able reorder uitableview way: touches cell predetermined period (e.g. 1 second), can drag , drop on other cells.

i know how implement 'long touch' detection using gesture recognizer, best way implement drag , drop ability without using reorder control (the user should drag cell anywhere in cell, not reorder control)?

i solved question of following steps:

  1. attach gesture recognizer uitableview.
  2. detect cell tapped "long touch". @ moment create snapshot of selected cell, put uiimageview , place on uitableview. uiimageview's coordinates should math selected cell relative uitableview (snapshot of selected cell should overlay selected cell).
  3. store index of selected cell, delete selected cell , reload uitableview.
  4. disable scrolling uitableview. need change frame of snapshot uiimageview when drag cell. can in touchesmoved method.
  5. create new cell , reload uitableview (you have stored index) when user finger leaves screen.
  6. remove snapshot uiimageview.

but not easy it.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -