Created
March 4, 2016 22:15
-
-
Save erikfloresq/9bcfeb4af7e8f65368a2 to your computer and use it in GitHub Desktop.
Presentation cell with animation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class func animateCell(cell:UITableViewCell) -> Void{ | |
let fadeOutAnimation:CABasicAnimation = CABasicAnimation(keyPath: "opacity") | |
fadeOutAnimation.duration = 1.0 | |
fadeOutAnimation.removedOnCompletion = false | |
fadeOutAnimation.fillMode = kCAFillModeBackwards | |
fadeOutAnimation.fromValue = NSNumber(float: 0.0) | |
fadeOutAnimation.toValue = NSNumber(float: 1.0) | |
cell.layer.addAnimation(fadeOutAnimation, forKey: "animateOpacity") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment