willowtreeapps/spruce-ios

Reproducing the middle animation on the README

Daltron opened this issue · 6 comments

First off, this library is awesome and I want to thank everybody who has had a part in making it open source.

I'm trying to reproduce the middle animation on the README file and I can't seem to line up the right attributes to get it to do exactly what it is doing. Any help would be appreciated!

screen shot 2017-03-16 at 11 55 45 am

@Daltron Thanks so much! More then willing to help. I have attached the storyboard and swift class file that we used to make the gif. Example.zip

Let me know if you need anything else.

@jacksontaylor13 Thanks for the quick response. It's greatly appreciated. What animations are in the self.animations variable? Unless I missed them, they are nowhere to be found in the two files inside that zip file. Also, I saw that that view above was not a tableview, but a view with quite a few nested views. Will the animation work exactly the same for a table view?

@Daltron Yes! If you are looking for it to be a table view, definitely check out the example in the sample app.

In terms of the animations variable, those were set in another file. Sorry about that. They are set to [.slide(.up, .moderately), .fadeIn].

@jacksontaylor13 It doesn't appear to have the same effect. With those animations, the rows in my table view slide up (as expected), bounce down slightly (unexpected), then bounce back up slightly (also unexpected). In the README, there is no bouncing of any kind.

spruce

@Daltron So the bounce appears to be coming from the use of a SpringAnimation type. What does your exact Spruce call look like?

@jacksontaylor13 ahh completely my fault! I am indeed using a SpringAnimation instead of a StandardAnimation. After changing that, it works exactly as expected.

Thanks for the help and keep up the great work! 😄