更改frame的动画效果

转载自:http://hi.baidu.com/wwssttt/item/a74736506ead3adbd48bacd5

//开始动画。在此之前设定好要做动画效果的view的frame

[UIView beginAnimations:nil context:nil];  

//

设定动画出现方式

[UIViewsetAnimationCurve:UIViewAnimationCurveEaseInOut];

//设定动画持续时间

[UIView setAnimationDuration:2];

[UIView setAnimationDelegate:self];

//设定动画效果

[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:myview cache:YES];

//动画的内容

contentImageV.frame=CGRectMake(contentImageV.frame.origin.x,contentImageV.frame.origin.y+100,

                               contentImageV.frame.size.width,contentImageV.frame.size.height);

//or 

contentImageV.frame.y = contentImageV.frame.origin.y+100;

//动画结束

[UIView commitAnimations];


你可能感兴趣的:(更改frame的动画效果)