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

Added rate animations #32

Merged
merged 6 commits into from May 19, 2016
Merged

Added rate animations #32

merged 6 commits into from May 19, 2016

Conversation

dpelletier2017
Copy link
Contributor

Basically everything happens in :

  • Gauge+Animations.swift (new file)
  • MainViewController.swift (changed)

And I had to add two variables :

  • animationTimer
  • animationCompletionBlock

Now, I absolutely DON'T get the easy part of the job, shame on me... I don't get how to update the framework in the example. So the example won't compile for now. I was not able to test the final result, but it should work no problem.

@skywinder
Copy link
Owner

@f8th wow. Looks nice! I will add your PR soon!
I didn't find easier way to animate UIView's yet.
Probably it's possible, by going to Core Animation. So will add your method.
Thank you for contribution!

@dpelletier2017
Copy link
Contributor Author

Hey no problem ;)
I needed to do it in my upcoming game, and was surprised UIView.animateKeyFramesWithDuration wouldn't work. In fact I thought there was a bug where it would call the completion block right away.

So I managed to somewhat reproduce UIView.animateKeyFramesWithDuration in another way just to animate the rate. I learned a LOT of things doing that !

If you could just tell me the general steps required to update a framework in Xcode, I'd be glad to know ! I'm hitting my head on the wall right now for something that looks so simple to do 😫

Right now, what I do is :

  • Open the .xcworkspace file
  • Do a couple of changes in the GaugeKit project on the left
  • Build the GaugeKit framework on "Generic iOS Device"
  • And then I expect it to work... :(

@dpelletier2017
Copy link
Contributor Author

Colors array are now fully functional !
My UIColor Blender extension could use a little tweaking, but it's not bad.
Here's what a Circle Gauge gives when colorsArray = [UIColor.redColor(), UIColor.orangeColor(), UIColor.greenColor()]

Animated Colors Array.mp4.zip

And you can put in as many colors as you want in the array :D

@skywinder
Copy link
Owner

@f8th wow, pretty cool feature! 👍
I definitely want to add it also! But has a some additions, that want to add it before.
May I ask you to split this 2 thing on 2 PR's? I would like to review them separately.

And thank you for your contribution! I will try to make frameworks work by myself.Seems, that you are doing right. It should rebuild frameworks during your steps, I will check it now.
Did you try to "Delete Derived Data" in Xcode?

@dpelletier2017
Copy link
Contributor Author

I don't have much time on my hands, but I'll try to separate them when I can. I tried deleting the cache, but nothing seems to work. It's not the only project that does this, I can't work with frameworks in Xcode for some reason, so I just copy the source files in my projects :-/

@sinanku
Copy link

sinanku commented May 11, 2016

This looks awesome, any update on when it will be merged?

@skywinder
Copy link
Owner

skywinder commented May 16, 2016

@f8th there was 3 problems:

  1. you new method was not public, that's why it doesn's called properly
  2. you send double instead CGFloat
  3. Since you change Bool to [UIColor] - there was several conflicts in IB.

I already fixed everything. Please merge my PR and kindly check, that everything work. As soon as you check it - I will merge your update and will bump version! 👍

@sinanku
Copy link

sinanku commented May 17, 2016

@f8th this is a pretty useful tool I use for cleaning my workspace, in addition to deleting derived data whenever I have framework problems https://github.com/BendingSpoons/cocoapods-clean

Sometimes deleting the cache also helps ~/Library/Caches/com.apple.dt.Xcode

Also @skywinder is there any update on using gradients within the lines?#2

Great work on the library :)

@skywinder
Copy link
Owner

@f8th please merge my PR in order to fix errors: https://github.com/f8th/GaugeKit/pull/1

fix errors - everything looks good !
@dpelletier2017
Copy link
Contributor Author

Should be fine !!! Great job

@skywinder skywinder mentioned this pull request May 19, 2016
@skywinder skywinder merged commit 553f652 into skywinder:master May 19, 2016
@skywinder
Copy link
Owner

Travis still fails, but it's something wrong with settings. Merged 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

Successfully merging this pull request may close these issues.

None yet

4 participants