Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to add a bounce effect to the animation below. Here is my code:

Objective-C
[UIView animateWithDuration:1.0
                       delay:.0
      usingSpringWithDamping:0.5
       initialSpringVelocity:2.0
                     options:UIViewAnimationOptionCurveEaseOut
                  animations:^{
                      // Coming from a value of CGAffineTransformMakeScale(0.001, 1.0)
                      self.myView.transform = CGAffineTransformMakeScale(1.0, 1.0);
                  }completion:nil
          ];

It's not working correctly. It becomes wider at the end of the animation then it goes back to normal. I want the width to bounce to a lesser value than 1.0, not more than 1.0.
Posted

1 solution

Dynamic animations have better ways to implement since iOS 7. Study this Sample code from Apple or from Ray Wenderlich.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900