我的iOS动画01
1.嵌套使用,先变大再消失
[UIView animateWithDuration:1.25 aniamtions:^{
CGAffineTransform newTRansform = CGAffineTransformMakeScale(1.2, 1.2);
[firstImageView setTransform:newTransform];
[secondImageView setTransform:newTransform];
completion:^(BOOL finished){
[UIView animateWithDuration:1.2 animations:^{
[firstImageView setAlpha:0];
[secondImageView setAlpha:0];
}
completion:^(BOOL finished){
[firstImageView removeFromSuperview];
[secondImageView removeFromSuperview];
}
];
}
];
ios 怎么设置动画让一个view从底部弹出来:
首先设置一个VIEW初始位置在屏幕下, 比如iPhone6:CGRectMake(0, 667, 375, 667);
然后在一个方法中(比如button出发的方法)view添加动画
[UIView animateWithDuration:0.5 animations:^{
// 设置view弹出来的位置
self.myView.frame = CGRectMake(40, 100, 200, 250);
}];