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

Bug fixes and MotionViewTransition #53

Merged
merged 9 commits into from
Sep 24, 2018
Merged

Bug fixes and MotionViewTransition #53

merged 9 commits into from
Sep 24, 2018

Conversation

OrkhanAlikhanov
Copy link
Contributor

@DanielDahan Please, review commit by commit. Also some commit messages come with extra explanation.

Summary:

  • Made MotionTransition.{start|update|finish|cancel} methods public
  • Made project indentation 2
  • Changed to updating model before firing animations for CALayer animations.
  • Added reverting XXForNextTransition options back to default.
  • Fixed issue when interactive transition was cancelled it was calling finish instead of cancel
  • Fixed appearance transition callbacks for transition cancellation
  • Fixed resume time was calculated incorrectly
  • Fixed ~0.001 seconds precision issue by storing current time
  • Added MotionViewTransition to make transitions of views possible

This way we no longer need CAAnimationDelegate to
listen to animationDidStop in order to update the model
and remove animation after it's done. We update the model
in advance, and system just removes the animation on completion

Also fixes animation group not removed from layer after completion
There is no need to recalculate duration from the current state
of the view. Motion calculates it when animations is first fired off
and on resume remaining duration can be recalculated
as usual (duration - progress).
The ~0.001 seconds lag between animations were extremely
noticeable if the duration was long.
Copy link
Member

@daniel-jonathan daniel-jonathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the most solid PRs I have ever seen. Thank you!

@daniel-jonathan daniel-jonathan merged commit 4a8fa6a into CosmicMind:development Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants