摘要:本文将带你了解iOS开发之点击button放大后缩小效果,希望本文对大家学IOS有所帮助。
[objc] view plain copy 1. -(void)buttonClick{ 2. button.transform = CGAffineTransformIdentity; 3. [UIView animateKeyframesWithDuration:0.5 delay:0 options:0 animations: ^{ 4. [UIView addKeyframeWithRelativeStartTime:0 relativeDuration:1 / 3.0 animations: ^{ 5. 6. button.transform = CGAffineTransformMakeScale(1.5, 1.5); 7. }]; 8. [UIView addKeyframeWithRelativeStartTime:1/3.0 relativeDuration:1/3.0 animations: ^{ 9. 10. button.transform = CGAffineTransformMakeScale(0.8, 0.8); 11. }]; 12. [UIView addKeyframeWithRelativeStartTime:2/3.0 relativeDuration:1/3.0 animations: ^{ 13. 14. button.transform = CGAffineTransformMakeScale(1.0, 1.0); 15. }]; 16. } completion:nil]; 17. }
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标移动开发之IOS频道!
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号