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

Animation help? #2

Open
matt-green-ra opened this issue Aug 8, 2018 · 2 comments
Open

Animation help? #2

matt-green-ra opened this issue Aug 8, 2018 · 2 comments

Comments

@matt-green-ra
Copy link

Hello Ajay! This is great. I'm excited to use it in my app =). I've implemented it and am able to change all values needed. I'd like to be able to adjust the animation values. Is this possible? The needle "bounces" more than I'd like it to. Would it be possible to have it approach the value and bounce less and more smoothly? Thanks!

@matt-green-ra
Copy link
Author

I did this inside your drawNeedle() function:

animate(triangleLayer: triangleLayer, shadowLayer: shadowLayer, fromValue: needleValue-2, toValue: needleValue+2, duration: 0.2) {
            self.animate(triangleLayer: triangleLayer, shadowLayer: shadowLayer, fromValue: self.needleValue+2, toValue: self.needleValue-2, duration: 0.1, callBack: {
                self.animate(triangleLayer: triangleLayer, shadowLayer: shadowLayer, fromValue: self.needleValue-2, toValue: self.needleValue, duration: 0.2, callBack: {})
            })
        }

It's close enough to get the job done for now. If you update this with more animation options that would be AWESOME! Thanks for building and sharing. I found you on Medium =)

@beherasusanta
Copy link

Hello Ajay. Nice Framework i have implemented in my application. Actually in iPhone XR the app is crashing(Client's device) in ABGaugeView.getAllAngles(). Can you pls guide me what may the issue.

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

2 participants