Skip to content

iCoder86/ViewTransition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

ViewTransition

@IBAction func switchAction(_ sender: UIButton) {
    isFliped = !isFliped
    
    let fromView = (isFliped) ? redCard : blueCard
    let toView = (isFliped) ? blueCard : redCard
    
    UIView.transition(from: fromView!, to: toView!, duration: 0.3, options: [(isFliped) ? .transitionFlipFromLeft : .transitionFlipFromRight,.showHideTransitionViews])
    
}

Reference

Releases

No releases published

Packages

No packages published

Languages