从右向左动画滑动
2017-01-06 本文已影响16人
seventhboy
CGContextRef contentext = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:contentext];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[UIView setAnimationDuration:0.4];
self.transform = CGAffineTransformMakeTranslation(-Scale(375), 0);
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationFinished)];
[UIView commitAnimations];