Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpringAnimations #600

Closed
wants to merge 4 commits into from
Closed

SpringAnimations #600

wants to merge 4 commits into from

Conversation

traviskirton
Copy link
Collaborator

No description provided.

Includes `Spring` struct, and variables in `C4ViewAnimation` for
handling the application of springs.

Example:

```
let view = C4View(frame: canvas.frame)
let c = C4Circle(center: C4Point(), radius: 50)
canvas.add(c)
C4ShapeLayer.disableActions = false
canvas.addTapGestureRecognizer { (location, state) -> () in
    let a = C4ViewAnimation(duration: 1.0) {
        c.center = location
        c.fillColor = C4Color(red: random01(), green: random01(), blue:
random01(), alpha: 1.0)
    }
    a.spring = Spring(damping:0.5)
    a.animate()
}
```
Includes:
- Initializer for C4Shape(shape: C4Shape)
- Initializer for C4Image() //empty image
- Initializing contents of C4Shape to a {1,1} clear image, otherwise
animating between nil and cgimageref doesn’t animate

Fixes: #592
@alejandro-isaza alejandro-isaza deleted the SpringAnimations branch January 21, 2016 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants