Skip to content

1990jiang/JJPopAnimations

Repository files navigation

JJPopAnimation

CI Status Version License Platform

目录

背景介绍:

这是我自己上传的第一个开源框架,目前的版本还不适合使用,还有许多地方值得修改

使用说明:

使用 pod 'JJPopAnimation'可以直接使用这个框架。 当然你也可以下载框架,然后将JJPopAnimation文件夹拖入工程中
导入框架 #import "PopoverAnimator.h"
//点击事件
-(void)clickBtn{
   //1.创建你需要modal出来的控制器
   JJTestViewController *popover = [[JJTestViewController alloc]init];
   
   //2. 设置modal样式--因为不设置的话会造成popoverVc弹出的时候,打底的首页和tabBarVc全部被移除掉了,而我的popoverVc不是遮住整个屏幕的,所以不能让底部的控制器移除掉了
   popover.modalPresentationStyle = UIModalPresentationCustom; //设置成这个就不会移除了
   
   //3.设置转场代理
 
  self.popoverAnimator = [[PopoverAnimator alloc]init];
  // 设置动画执行时间
  self.popoverAnimator.timeAnimator = 0.8;
  //  设置转场视图的锚点
  self.popoverAnimator.popAnchorPoint = CGPointMake(0.5, 0);
   
   
   //  设置转场协议
   popover.transitioningDelegate = self.popoverAnimator;
  //4.弹出控制器
   [self presentViewController:popover animated:YES completion:nil];
   
   
}



Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

JJPopAnimation is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "JJPopAnimation"

Author

1990jiang, 562752212@qq.com

License

JJPopAnimation is available under the MIT license. See the LICENSE file for more info.

About

这是我自己做的弹出视图第一个版本,还有许多需要优化的地方,这是测试一下上传远程框架的。

Resources

License

Stars

Watchers

Forks

Packages

No packages published