炫酷转场动画-iOS

作者: 豫风 | 来源:发表于2018-04-26 13:44 被阅读1360次
1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gif

2018-05-17增加CATransition动画

transitionCube.gif transitionCurl.gif transitionOgl.gif transitionRipple.gif transitionSuck.gif

使用方法

1、导入头文件UIViewController+HHTransition
2、调用如下方法,基本只需要一句话,无侵入,API简单易用

        case 0:
            [self.navigationController hh_presentCircleVC:[CircleViewController new] point:_touchPoint completion:nil];
            break;
        case 1:
            [self.navigationController hh_presentBackScaleVC:[BackScaleViewController new] height:400 completion:nil];
            break;
        case 2:
            [self.navigationController hh_presentErectVC:[CircleViewController new] completion:nil];
            break;
        case 3:{//需要重写 hh_transitionAnimationView
           InterScaleViewController *interScale = [InterScaleViewController new];
            interScale.imageName = [UIImage imageNamed:@"1.jpg"];
            [self.navigationController hh_pushScaleViewController:interScale];
        }
            break;
        case 4:{//需要重写 hh_transitionAnimationView
            InterScaleViewController *interScale = [InterScaleViewController new];
            interScale.imageName = [UIImage imageNamed:@"2.jpg"];
            [self.navigationController hh_pushScaleViewController:interScale];
        }
            break;
        case 5:
            [self.navigationController hh_pushTiltViewController:[CircleViewController new]];
            break;
        case 6:
            [self.navigationController hh_pushErectViewController:[CircleViewController new]];
            break;
        case 7:
            [self.navigationController hh_pushBackViewController:[CircleViewController new]];
            break;
        default:
            break;

下载地址:Github

支持cocoapod

target 'MyApp' do
  pod 'HHTransition', '~> 1.0'
end

相关文章

网友评论

  • 虽晚仍安:你好 反馈一下. VC_a hh_pushScaleViewController到VC_b或者 VC_b 返回到VC_a,如果b导航栏隐藏,而a没有隐藏,界面会出现偏移 两种设置都会出现 [self.navigationController setNavigationBarHidden:NO];
    或者 [self.navigationController.navigationBar setHidden:NO]; 请问有遇到吗 是怎么解决的?
    虽晚仍安:@豫风 好的 非常感谢 这个框架很好用 我临时设置tableView的offset的
    豫风:对于使用系统导航确实会有问题,因为用的是frame,对地图电话进后台也会有影响。稍后有时间我优化下吧。
  • 63a34d4f342d:你好,请问下这个导航怎么还原呢? 比如我A-B需要转场动画,B-C不需要了。 我试着把deegate置为nil,但是系统的返回手势就不能用
    豫风:你好,默认是不需要任何操作的,只需要正常的push就可以,之所以手势失效是因为隐藏导航栏所致,Demo我已经修改了导航的继承关系,麻烦你clone再看下吧。
  • 丶皮蛋菌:楼主,请问使用这个库,导航栏是不是会有影响?我使用了之后,导航栏的自定义返回按钮不见了
    豫风:你好,这个暂时没有适配系统导航栏,建议隐藏系统导航栏改为自定义。
  • 4fcace74a970:请问支持swift吗?
    我在swift文件内搭建桥接后还是用不了。
    豫风:你好,我试了下,在桥接模式下可以使用,可以参考这个链接
    https://www.jianshu.com/p/cf470feb963e

本文标题:炫酷转场动画-iOS

本文链接:https://www.haomeiwen.com/subject/spwplftx.html