ios - Multiple swift animations in parallel not working -
i have code animating elements (total of 3) in view.
element in elements{ if element.value != radians { uiview.animatewithduration(0.99, animations: { element.transform = cgaffinetransformmakerotation(cgfloat(radians)) }, completion: { finished in element.value = radians }) } }
when 2 or more elements should animated (uiview.animatewithduration called 2 or more times 1 after another), 1 animating , animation quite choppy. know should write in animation block, can't figure out how it. please help me.
just set loop within animation block.
uiview.animatewithduration(0.99, animations: { element in elements { if element.value != radians { element.transform = cgaffinetransformmakerotation(cgfloat(radians)) } } }, completion: { _ in element.value = radians })
ios animation swift
No comments:
Post a Comment