NSString *filename = [NSString stringWithFormat:@"%d.jpg", self.index + 1];
self.iconView.image = [UIImage imageNamed:filename];
// 转场动画
CATransition *anim = [CATransition animation];
/*
fade //交叉淡化过渡(不支持过渡方向) kCATransitionFade
push //新视图把旧视图推出去 kCATransitionPush
moveIn //新视图移到旧视图上面 kCATransitionMoveIn
reveal //将旧视图移开,显示下面的新视图 kCATransitionReveal
cube //立方体翻滚效果
oglFlip //上下左右翻转效果
suckEffect //收缩效果,如一块布被抽走(不支持过渡方向)
rippleEffect //滴水效果(不支持过渡方向)
pageCurl //向上翻页效果
pageUnCurl //向下翻页效果
cameraIrisHollowOpen //相机镜头打开效果(不支持过渡方向)
cameraIrisHollowClose //相机镜头关上效果(不支持过渡方向)
*/
anim.type = @"pageCurl";
//方向
anim.subtype = kCATransitionFromRight;
anim.duration = 0.5;
//从起始/结束点
anim.startProgress = 0.0;
anim.endProgress = 0.5;
[self.view.layer addAnimation:anim forKey:nil];