ios - Tableview scroll is not stopping on tap if i animate tableview cells -


i trying add animations in tableview cells , animations working fine. when try stop scroll of tableview tapping not stopping. in scrolling tableview if tap of screen scroll stop. when add these animations thats not working. below code use animations

func tableview(tableview: uitableview, willdisplaycell cell: uitableviewcell, forrowatindexpath indexpath: nsindexpath) {     let rotationtransform = catransform3dscale(catransform3didentity, 0.4, 0.4, 0)      cell.layer.transform = rotationtransform     uiview.animatewithduration(0.5) { () -> void in         cell.layer.transform = catransform3didentity     } } 

note:

this normal behavior animations using 1 of animatewithduration... method. still if want user interaction during animation can try below have shown.

simply need try :

func tableview(tableview: uitableview, willdisplaycell cell: uitableviewcell, forrowatindexpath indexpath: nsindexpath) {     let rotationtransform = catransform3dscale(catransform3didentity, 0.4, 0.4, 0)     cell.layer.transform = rotationtransform      uiview.animatewithduration(0.5, delay: 0.5, options: uiviewanimationoptions.allowuserinteraction, animations: { () -> void in         cell.layer.transform = catransform3didentity         }, completion: nil) } 

hope you.


Comments