Skip to content

Instantly share code, notes, and snippets.

@madhu314
Created February 8, 2017 07:28
Show Gist options
  • Save madhu314/686aa00b7e16f51373b4969243d0fcc8 to your computer and use it in GitHub Desktop.
Save madhu314/686aa00b7e16f51373b4969243d0fcc8 to your computer and use it in GitHub Desktop.
cell.deletedClosure = { listItem in
UIView.animate(withDuration: 0.3, delay: 0.0, usingSpringWithDamping: 1, initialSpringVelocity: 0.5, options: .curveEaseIn, animations: {
self.decorateReadyToMove(for: cell, andAngle: 0)
cell.transform = CGAffineTransform(scaleX: 0.01, y: 1)
}, completion: { (_) in
cell.transform = CGAffineTransform(scaleX: 0.01, y: 0.01)
cell.alpha = 0
self.listItemDataset.remove(item: listItem, on: self.collectionView)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment