How do I do a simple completion block in Swift 3?
I want to set self.isOpen = true
in the completion 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)
In passing:
It's pretty impossible to learn Swift 3 atm due to NOTHING on the internet working :(
I've also searched this entire document for even a mention of the word "animate" and could not find anything: