// [UIView transitionFromView:self.aView toView:self.bView duration:1 options:UIViewAnimationOptionTransitionCurlDown completion:^(BOOL finished) {
// NSLog(@"asd");
// }];
[UIView transitionWithView:self.aView duration:2 options:UIViewAnimationOptionTransitionCurlUp animations:^{
_aView.backgroundColor=[UIColor greenColor];
} completion:^(BOOL finished) {
}];
/*
// [UIView animateWithDuration:3 animations:^{
// self.customVoew.alpha=0;
// }];
// [UIView animateWithDuration:3 animations:^{
// //书写动画效果
// self.customVoew.backgroundColor=[UIColor yellowColor];
//
// } completion:^(BOOL finished) {
// //动画完成后执行的代码
// self.customVoew.bounds=CGRectMake(0, 0, 100, 200);
// }];
// [UIView animateWithDuration:3 delay:3 options:UIViewAnimationOptionAllowUserInteraction animations:^{
// self.customVoew.backgroundColor=[UIColor yellowColor];
// } completion:^(BOOL finished) {
// self.customVoew.transform=CGAffineTransformMakeRotation(M_PI_2);
// }];
[UIView animateWithDuration:3 delay:3 usingSpringWithDamping:4 initialSpringVelocity:1 options:UIViewAnimationOptionAutoreverse animations:^{
self.customVoew.transform=CGAffineTransformMakeRotation(M_E);
} completion:^(BOOL finished) {
NSLog(@"ssssss");
}];
*/
}
/*-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelay:2];
[UIView setAnimationDuration:5];
[UIView setAnimationRepeatCount:2];
[UIView setAnimationRepeatAutoreverses:YES];
_myView.bounds=CGRectMake(0, 0, 20, 20);
[UIView commitAnimations];
}*/
/*-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
//开始动画
[UIView beginAnimations:nil context:nil];
//设置动画持续时间
[UIView setAnimationDuration:10];
//设置延时执行
[UIView setAnimationDelay:2];
//设置动画重复次数
[UIView setAnimationRepeatCount:10];
//设置动画反转
[UIView setAnimationRepeatAutoreverses:YES];
//设置动画路径(速率分布)
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
//------------------------------------------0-------
//设置代理
[UIView setAnimationDelegate:self];
//动画开始后执行的方法
[UIView setAnimationWillStartSelector:@selector(begin )];
//动画结束后执行的方法
[UIView setAnimationDidStopSelector:@selector(end)];
//-------------------------------------------------
self.customVoew.center=CGPointMake(kScreenWidth/2, 50);
//改变视图大小
self.customVoew.bounds=CGRectMake(0, 0, 10, 10);
self.customVoew.backgroundColor=[UIColor redColor];
// self.customVoew.alpha=0;
//提交动画
[UIView commitAnimations];
}*/