iOS动画总结
两种动画:
===============================================================
1:UIView动画
[UIView setAnimationDuration:0.5f];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationRepeatAutoreverses:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDownforView:self.viewcache:YES];
CATransition *animation = [CATransitionanimation];
animation.delegate = self;
animation.duration = 0.5f * slider.value;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.fillMode = kCAFillModeForwards;
animation.endProgress = slider.value;
animation.removedOnCompletion = NO;
case 0:
animation.type = @"cube";//---
break;
case 1:
animation.type = @"suckEffect";//103
break;
case 2:
animation.type = @"oglFlip";//When subType is "fromLeft" or "fromRight", it's the official one.
break;
case 3:
animation.type = @"rippleEffect";//110
break;
case 4:
animation.type = @"pageCurl";//101
break;
case 5:
animation.type = @"pageUnCurl";//102
break;
case 6:
animation.type = @"cameraIrisHollowOpen ";//107
break;
case 7:
animation.type = @"cameraIrisHollowClose ";//106
break;
default:
break;
animation.subtype = kCATransitionFromRight;
[self.view.layeraddAnimation:animation forKey:@"animation"];