ios界面跳转动画
界面跳转动画:
ViewController的属性:
//设置跳转动画的类型
myVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
添加转场动画:
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
self.imageIndex++;
if (self.imageIndex > 43) return;
NSString *imageName = [NSString stringWithFormat:@"a%ld",self.imageIndex];
// 添加转场动画
[UIView transitionWithView:self.imageView duration:0.01 options:UIViewAnimationOptionTransitionCurlUp animations:^{
self.imageView.image = [UIImage imageNamed:imageName];
} completion:nil];
}
成功的三大原则:
1、坚持
2、不要脸
3、坚持不要脸