SJFullscreenPopGesture
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
SJFullscreenPopGesture is available through CocoaPods. To install it, simply add the following line to your Podfile:
# ObjC
pod 'SJFullscreenPopGesture/ObjC'
# Swift
pod 'SJFullscreenPopGesture/Swift'
Author
changsanjiang, [email protected]
License
SJFullscreenPopGesture is available under the MIT license. See the LICENSE file for more info.
手势功能介绍
这个手势返回库交换了导航控制器的push方法, 以便触发push操作时, 生成底部视图的snapshot.
// default is `SJFullscreenPopGestureType_EdgeLeft`.
typedef NS_ENUM(NSUInteger, SJFullscreenPopGestureType) {
SJFullscreenPopGestureType_EdgeLeft, // 默认, 屏幕左边缘触发手势
SJFullscreenPopGestureType_Full, // 全屏触发手势
};
-
可设置Pop返回时的动画效果 目前有两种:
/// 将要拖拽
@property (nonatomic, copy, readwrite, nullable) void(^sj_viewWillBeginDragging)(__kindof UIViewController *vc);
/// 拖拽中
@property (nonatomic, copy, readwrite, nullable) void(^sj_viewDidDrag)(__kindof UIViewController *vc);
/// 结束拖拽
@property (nonatomic, copy, readwrite, nullable) void(^sj_viewDidEndDragging)(__kindof UIViewController *vc);