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

让view有弹性效果

时间:2014-07-28 15:48:23      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:ios   animatewithduration   

让view有弹性效果

by 伍雪颖

- (void)viewDidLoad {
    [super viewDidLoad];
    CGAffineTransform transform = _view1.transform;
    transform = CGAffineTransformScale(self.view1.transform, 2, 2);
    self.view1.transform = transform;
}

- (IBAction)button:(id)sender {
    __block ViewController *wself = self;
    [UIView animateWithDuration:1.0 delay:0 usingSpringWithDamping:0.1 initialSpringVelocity:0.1 options:0 animations:^{
        CGAffineTransform transform = wself.view1.transform;
        transform = CGAffineTransformScale(wself.view1.transform, 0.9, 0.9);
        wself.view1.transform = transform;
    } completion:nil];
}


让view有弹性效果,布布扣,bubuko.com

让view有弹性效果

标签:ios   animatewithduration   

原文地址:http://blog.csdn.net/rainlesvio/article/details/38229917

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