- (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]; }
原文地址:http://blog.csdn.net/rainlesvio/article/details/38229917