Skip to content

Commit 0baaa54

Browse files
ZYNZYN
ZYN
authored and
ZYN
committed
修改ReadMe
1 parent cd2d826 commit 0baaa54

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed
342 KB
Loading
Loading

README.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
11
# YNNavigationController
2-
全屏手势返回Pop以及推进Push。仿京东、天猫的手势库。具有伸缩以及平滑两种效果。目前采用截图编写。
2+
3+
####先上效果图
4+
5+
![](https://github.com/yongyuandouneng/YNNavigationController/tree/master/GifAndImage/YNNavigationControllerSlider.gif)
6+
![](https://github.com/yongyuandouneng/YNNavigationController/tree/master/GifAndImage/YNNavigationControllerScaleGif.gif)
7+
8+
喜欢就start鼓励一下,您在使用过程中有任何问题、出现任何(BUG、Crash),请加QQ群538133294或联系我的扣扣1003580893.
9+
10+
####集成方法
11+
12+
将原来的`UINavigationController`替换为`YNNavigationController`即可,
13+
也可以采用继承YNNavigationController方式,重写里面的系统方法以及属性设置。详细见Demo.
14+
15+
####相关操作
16+
17+
1.push一般会对返回按钮进行拦截,此时可以调用里面的返回动画方法yn_popViewController.
18+
19+
2.pop、popToVC、popToRoot这三个方法如果不需要和返回手势那个动画的话则调用原生方法,如果需要则调用与之对应的方法。
20+
21+
3.如果某控制器不需要手势返回则在里面写上禁止手势方法`self.yn_banRightSliderGesture = YES;`
22+
23+
4.如果需要隔层替换滑动手势的话则先设置`yn_resetGestureViewController = YES`,然后再赋值你要替换的层控制器类名`self.yn_resetGestureViewControllerClass = [TestViewController class]`,详情使用请看Demo.
24+

YNNavigationController/Demo/TestNavigationController.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ - (void)viewDidLoad{
1515
[super viewDidLoad];
1616

1717
//配置属性
18-
self.shotViewAnimationType = ShotViewAnimationTypeSlider;
19-
18+
self.shotViewAnimationType = ShotViewAnimationTypeScale;
19+
self.scaleViewFloat = 0.9;
2020

2121
}
2222

@@ -35,7 +35,7 @@ - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)ani
3535
}
3636

3737
- (void)popToPre{
38-
//统一处理返回
38+
3939
[self yn_popViewController];
4040

4141
}

YNNavigationController/Libs/YNNavigationController/UIViewController+YNNavigationViewController.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/** 是否禁止右滑手势 NO */
1515
@property (nonatomic, assign) BOOL yn_banRightSliderGesture;
1616

17-
/** 是否开启重置手势 开启后才能设置下面的值 NO */
17+
/** 是否开启重置手势 开启后才能设置下面的值 默认 NO */
1818
@property (nonatomic, assign) BOOL yn_resetGestureViewController;
1919

2020
/** 重置手势滑动返回的上一个控制器 Class */

0 commit comments

Comments
 (0)