sjf

SJFullscreenPopGesture

Fullscreen pop gesture. OC&Swift. It is very suitable for the application of the video player. Support `cocoapods`. 只需`pod`即可自带全屏返回手势. 支持pod. 支持OC&Swift.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

272

Maintenance

Last Commit

2mos ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

SJFullscreenPopGesture

CI Status Version License Platform

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, changsanjiang@gmail.com

License

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

手势功能介绍

这个手势返回库交换了导航控制器的push方法, 以便触发push操作时, 生成底部视图的snapshot.

  1. 可设置手势类型: 全屏手势 || 边缘手势.
// default is `SJFullscreenPopGestureType_EdgeLeft`.
typedef NS_ENUM(NSUInteger, SJFullscreenPopGestureType) {
    SJFullscreenPopGestureType_EdgeLeft,    // 默认, 屏幕左边缘触发手势
    SJFullscreenPopGestureType_Full,        // 全屏触发手势
};
  1. 可设置Pop返回时的动画效果 目前有两种:

    - [类似腾讯视频返回.gif](https://upload-images.jianshu.io/upload_images/2318691-d5a992c40cfee5bb.gif?imageMogr2/auto-orient/strip)
    - [在1的基础上加上了一层遮罩.gif](https://upload-images.jianshu.io/upload_images/2318691-3dcd02f47b0dff4a.gif?imageMogr2/auto-orient/strip)
    
  2. 可在某个ViewController禁用手势

  3. 可兼容 WKWebView 手势返回

  4. 可设置盲区, 在这个区域不触发手势

  5. 可设置手势触发过程中的回调

/// 将要拖拽
@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);
  1. 可设置返回界面的显示模式, 目前有两种: 1. 使用快照(也可称截屏) 2. 使用原始视图(默认)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100