位移:
UIView * testView;
UIView.animateWithDuration(1, animations: {
testView.center.x = self.view.bounds.width - testView.center.x;
});
透明:
UIView.animateWithDuration(1, animations: {
testView.alpha = 0;//透明度为0
});
缩小/扩大UIView.animateWithDuration(1, animations: {
testView.transform = CGAffineTransformMarkScale(2.0,2.0);//2.0为倍数(即原来的大小乘以倍数,倍数大于1为扩大,小于1为缩小)
});
颜色改变:UIView.animateWithDuration(1, animations: {
testView.backgroudColor = [UIColor redColor];
});