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

How can change the animation time between moves? #15

Open
berildoguc opened this issue Feb 6, 2020 · 8 comments
Open

How can change the animation time between moves? #15

berildoguc opened this issue Feb 6, 2020 · 8 comments

Comments

@berildoguc
Copy link

Hi, your library is very good. I am using it. But, how can change the animation time between moves?

@v-braun
Copy link
Owner

v-braun commented Feb 6, 2020

Hi!
This parameter is currentley hard-coded.
I have right now not that time to add new features here but will keep this open til it is available.

You can do it yourself, here are the two values you have to adopt:

  1. move animation duration
  2. opacity animation duration

@berildoguc
Copy link
Author

berildoguc commented Feb 7, 2020

I changed this values like:
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .milliseconds(100) , execute: { UIView.animate(withDuration: 0.1) { itemView.alpha = 1 } }
and
animation.duration = 0

but anything changed. What should I do?

@v-braun
Copy link
Owner

v-braun commented Feb 7, 2020

Are you sure that your changes where really applied?
Have you installed the lib via cocoapods or copied the code over?
Maybe "0" is not a valid value for animations, can you set it to 100 or so to see a difference?

@berildoguc
Copy link
Author

I have installed the lib via cocoapods. I will try to set it to 100. Hope it helps otherwise I ask you again. Thanks...

@berildoguc
Copy link
Author

Nothing changed. I am going to wait until you add new features.
Even so it is a very good library, thanks for your time.

@v-braun
Copy link
Owner

v-braun commented Feb 10, 2020

Not sure that code modifications work with cocoapods.
My recomendation is to copy the file RollingPitTabBar into your project and adapt there the values. Remove the cocoapod dependency and this should work for you.

Later when I do the update you can remove the file again and use the pod

@Scankiran
Copy link

private func createPathMoveAnimation(toVal : CGPath) -> CABasicAnimation{ let animation = CABasicAnimation(keyPath: "path") animation.duration = 1

I setted duration to 0.3 and it works. You can find code on lines between 245 and 248.

@berildoguc
Copy link
Author

I will check this thanks.

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

3 participants