Animating properties of more than one elements
Closed this issue · 2 comments
netgfx commented
Hello,
I'm using this to animate properties of two elements, but the second one starts just before the first one stops they don't animate in parallel.
UIView.animateWithDuration(0.6, delay: 0.0,
options: [.CurveLinear],
animations: {
let viewWidth = self.view.frame.width
self.settingsView.frame.size.width = ((viewWidth-60) * 2)
self.view.frame.origin.x = viewWidth - 60
}, completion: { (done:Bool)->Void in
if done == true {
}
})
Am I doing this wrong? Which is the correct way of animating more than one element properties?
Thanks in advance!
icanzilb commented
This code looks okay, but what you describe is maybe happening because you have Auto Layout on?
icanzilb commented
if you check the example app included in the repo - there are many examples where an animation animates more than one view