ios - How to drag the cell on right in UITableView when tap, like in Snapchat? -


in snapchat application on main screen if tapped on cell contact - cell drag left right (look @ screen). how can this?

p.s. similar effect has ios lock screen when tap on camera on right bottom corner.

thanks in advanced.snapchat main screen

  1. add pangesturerecognizer tableview.
  2. track gesture recognizer states, , check translation.x value see position of drag.
  3. get view of drag = cell have.
  4. shift position of cell based on translation.x value, , @ time, move whatever view want show beneath it. [note: if want view slide left right, use translation.x value.
  5. check threshold of movement, if exceeds, leave view open. if not exceed, animate view cell's frame set normal.

[you can use velocity property along translation - gives user better experience. same swipe]

p.s. if still don't it, suggest google 'ios uitableviewcell swipe reveal` sure find plenty of examples.

peace.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -