Slide 20
Slide 20 text
UIView.animate(with… !
• Not all properties can be animated
• No designated way to interrupt
• Can't be controlled
• Chaining via nested blocks hell
UIView.animate(withDuration: 3, animation: {
self.backgroundColor = .red
}, completion: {
UIView.animate(withDuration: 3, animation: {
self.alpha = 0
}, completion: {
UIView.animate(withDuration: 3, animations:{
self.fire.setOn();
} completion:{
UIView.animate(withDuration: 3, animation: {
self.backgroundColor = .red
}, completion: {
UIView.animate(withDuration: 3, animation: {
self.backgroundColor = .red
}, completion: {
})
})
});
});
})