码迷,mamicode.com
首页 > 其他好文 > 详细

按钮旋转45度然后复原

时间:2015-08-03 18:15:36      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:

      //默认没旋转

        open=NO; 

 

 

        if (open==YES) {
            [UIView animateWithDuration:0.03 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
                btn1.transform = CGAffineTransformIdentity;
            } completion:^(BOOL finished) {
                open=NO;
            }];
        } else {
            [UIView animateWithDuration:0.03 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
                btn1.transform = CGAffineTransformMakeRotation(45.0f * (M_PI / 180.0f));
            } completion:^(BOOL finished) {
                open=YES;
            }];

        }

按钮旋转45度然后复原

标签:

原文地址:http://www.cnblogs.com/huangzs/p/4699683.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!