您的位置:首页 > 产品设计 > UI/UE

iOS UIView动画01

2016-06-04 13:14 344 查看
-(void) launchButtonAnimations {

    CGRect frame =
_launchButton.frame;

    CGPoint center =
_launchButton.center;

    //首尾式动画

    [UIView
beginAnimations:nil
context:nil];

    //执行动画

   
//设置动画执行时间

    [UIView
setAnimationDuration:2.0];

    //设置代理

    [UIView
setAnimationDelegate:self];

   
//设置动画执行完毕调用的事件

    self.launchButton.center = center;

    self.launchButton.bounds =
CGRectMake(0,
0, frame.size.height, frame.size.height)
;

    [UIView
setAnimationDidStopSelector:@selector(didStopAnimation)];

    [UIView
commitAnimations];

    

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: