UIView.animate – Swift 3 – finalización

¿Cómo hago un bloque de finalización simple en Swift 3?

Quiero establecer self.isOpen = true en la finalización de la 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) 

De paso:

Es bastante difícil aprender Swift 3 atm debido a NADA en Internet que funciona 🙁


También he buscado este documento completo incluso para mencionar la palabra "animar" y no pude encontrar nada:

https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/index.html#//apple_ref/doc/uid/TP40014097-CH3-ID0

Lo agrega así:

 UIView.animate(withDuration: 0.25, delay: 0.0, options: [], animations: { 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: { (finished: Bool) in self.isOpen = true }) 

Escríbalo como el siguiente código:

 UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: { // code })