-(Void) UIViewAnimation :( UIView *) view
Frame :( CGRect) frame
Type :( int) type
Alpha :( float) alpha
Duration :( float) duration
{
[UIView beginAnimations: nil context: nil];
[UIView setAnimationDuration: duration];
[UIView setAnimationCurve: type];
[UIView setAnimationDelegate: self];
View. alpha = alpha;
View. frame = frame;
[UIView commitAnimations];
}
Call Method
[Self UIViewAnimation: downView frame: CGRectMake (0, height, 320, 58) type: UIViewAnimationCurveEaseOut alpha: 1 duration: 0.3];
DownView is the animation view.
CGRectMake (0, height, 320, 58) Location Conversion
UIViewAnimationCurveEaseOut animation effect
There are also:
UIViewAnimationCurveEaseInOut, // slow at beginning and end
UIViewAnimationCurveEaseIn, // slow at beginning
UIViewAnimationCurveEaseOut, // slow at end
UIViewAnimationCurveLinear
1. Transparency change
0.3 animation time