How to make a simple completion block in Swift 3?
I want to set self.isOpen = true at the end of the animation:
UIView.animate(withDuration: 0.25, delay: 0.0, options: [], animations: { self.isOpen = true self.drawerView?.frame = CGRect(x: 0, y: 0, width: (self.drawerView?.frame.size.width)!, height: (self.drawerView?.frame.size.height)!) self.contentView?.frame = CGRect(x: 200, y: 0, width: (self.contentView?.frame.size.width)!, height: (self.contentView?.frame.size.height)!) }, completion: nil)
Passing:
It's pretty impossible to recognize Swift 3 atm due to NOTHING on the internet working :(
I also searched this entire document even for the mention of the word βreviveβ and found nothing:
https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/index.html#//apple_ref/doc/uid/TP40014097-CH3-ID0
ios swift3 uiviewanimation
Chris allinson
source share