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

Cancel a running tween? #28

Open
edolecki opened this issue Dec 12, 2012 · 3 comments
Open

Cancel a running tween? #28

edolecki opened this issue Dec 12, 2012 · 3 comments

Comments

@edolecki
Copy link

I've been looking @ the source and I haven't seen an obvious way to stop/kill a running tween yet. I'll keep looking but something like this should be available.

@avaidyam
Copy link

Simple: add an -invalidate method to the PRTweenOperation object, and in the large animation processing loop fired by the timer, check if the invalidation flag is set.

@jowie
Copy link

jowie commented Jun 14, 2013

You can do [[PRTween sharedInstance] removeTweenOperation:tweenOperation]; - the only problem is that it won't remove the tween until the following loop.

I have branched the code and updated it slightly so that a tween can be invalidated instantly, with the option of sending a final block/selector with the completed value. I will create a pull request shortly.

@kallipigous
Copy link

Did this fork ever get published I'd really like a simple way to cancel PRTween instances.

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

No branches or pull requests

4 participants