Skip to content

SwipeTransition broke animation #26

@dimabiserov

Description

@dimabiserov

animation like this dont work with pod :((

class ColorCell : UICollectionViewCell {

override var isHighlighted: Bool{
    didSet{
        if isHighlighted{
            //self.alpha = 0.5
                            UIView.animate(withDuration: 0.27, delay: 0.0, usingSpringWithDamping: 1, initialSpringVelocity: 1.0, options: [.curveEaseOut, .beginFromCurrentState], animations: {
                                self.transform = self.transform.scaledBy(x: 0.92, y: 0.92)
                            }, completion: nil)
        } else {
            //self.alpha = 1
                            UIView.animate(withDuration: 0.27, delay: 0.0, usingSpringWithDamping: 1, initialSpringVelocity: 1.0, options: [.curveEaseOut, .beginFromCurrentState], animations: {
                                self.transform = CGAffineTransform.identity
                            }, completion: nil)
        }
    }
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions