HLCustomTransitions 0.1.0

HLCustomTransitions 0.1.0

一些描述维护。



  • DargonLee

HLCustomTransitions

CI Status Version License Platform

示例

克隆项目然后运行pod install来查看实例效果

一行代码实现自定义多个方向的转场动画

  • 无耦合
  • 高效的转场
  • 稳定性好

Platform

安装

HLCustomTransitions 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中。

pod 'HLCustomTransitions'

使用

//创建要model的控制器实例控制器对象
MineViewController *mineVC = [[MineViewController alloc]init];

//创建转场动画实例对象 并设置专场动画方向的枚举值(有四个枚举值)
HLCustomPresentationController *presentationController = [[HLCustomPresentationController alloc]initWithPresentedViewController:mineVC presentingViewController:self presentedDirection:UIPresentationControllerDirectionFromLeft];

//设置专场动画的代理为自定义转场动画实例
mineVC.transitioningDelegate = presentationController;

[self presentViewController:mineVC animated:YES completion:NULL];
  • 或者直接下载 HLCustomPresentationController.h HLCustomPresentationController.m 文件,将其拖入项目中进行使用

作者

[email protected][email protected]

许可证

HLCustomTransitions 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。