You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible solution: look at animation groups to see if easing applies across all animations in the group. If so, then this is probably the best approach.
Here's an example that doesn't work:
import C4
import UIKit
class ViewController: C4CanvasController {
var previous: C4Shape!
override func setup() {
for i in 1...20 {
let s = C4Circle(center: canvas.center, radius: Double(50 - i * 2))
s.anchorPoint = C4Point(0.5, 1.0)
s.lineWidth = 0
if i == 1 {
s.center = canvas.center
canvas.add(s)
} else {
s.center = previous.bounds.center
previous.add(s)
}
previous = s
var dir = 1.0
if i % 2 == 0 {
s.fillColor = C4Pink
dir = -1.0
}
let a = C4ViewAnimation(duration: 0.25) {
s.rotation += 2*M_PI
}
a.addCompletionObserver {
a.animate()
}
a.animate()
}
}
}
The text was updated successfully, but these errors were encountered:
Possible solution: look at animation groups to see if easing applies across all animations in the group. If so, then this is probably the best approach.
Here's an example that doesn't work:
The text was updated successfully, but these errors were encountered: