Skip to content

UIImageView.transitionWithView

@available(iOS 4.0, *)

label.text = "😃"

// ...
UIView.transitionWithView(label, 
    duration: 0.5,
    options: .TransformationFlipFromLeft,
    animations: {
        label.text = "😨"
    },
    completion: nil
)


imageView.image = UIImage(named:"empty")

// ...
UIView.transitionWithView(imageView, 
    duration: 0.5,
    options: .TransformationCrossDisolve,
    animations: {
        imageView.image = UIImage(named:"full")
    },
    completion: nil
)


Last update: July 15, 2020