Monday, June 18, 2012

UIView class methods for common animations.

Following  UIView class  methods are convenience methods for common animations.

UIView Animation blocks

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.70];
[UIView setAnimationDelay:0.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
Your Code to change the position of UIVeiw goes here...
[UIView commitAnimations];

We can animate UIView in ios 5 using this simple code. 

[UIView animateWithDuration:0.5
                            options: UIViewAnimationCurveEaseOut
                             view.contentOffset = CGPointMake(position, 0.0f);
                         completion:^(BOOL finished){

No comments:

Post a Comment