ios - UICollectionView Animate when touched -


could point me in right direction on how animate uicollesctionview's cell when touched? i've read there several methods between didselectitemat uiview.animate or willdisplaycell caanimations. please point me in right direction in swift? goal tap cell , have scale/ change x position

i choose "didselectitemat", "uiview.animate"

override func collectionview(_ collectionview: uicollectionview, didselectitemat indexpath: indexpath) {     let cell = collectionview.cellforitem(at: indexpath)      animatedimage = uiimageview(frame: cell.frame)     animatedimage.image = ...      view.addsubview(animatedimage)      uiview.animate(withduration: 0.5, animations: {             self.animatedimage.frame = self.view.bounds             self.view.layoutifneeded()          }, completion: {(finished) in             ...         }) } 

Comments

Popular posts from this blog

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -