Latest 1.2.2
Homepage https://github.com/changsanjiang/SJFullscreenPopGesture
License MIT
Platforms ios 8.0, requires ARC
Dependencies SJObserverHelper
Authors

全屏返回手势. 适用于带有视频播放器的App.
Fullscreen pop gesture. An application with a video player is available.

Use

pod 'SJFullscreenPopGesture'

天朝

https://juejin.im/post/5a150c166fb9a04524057832

Example

功能

  • 全屏手势(兼容scrollView, 当scrollView.contentOffset.x==0时, 触发全屏手势).
  • 指定盲区, 在指定区域不触发全屏手势. 可指定Frame或者View.
  • 切换, 系统边缘手势与全屏手势切换.
  • 禁用, 可在某个页面禁用手势.

如果好用, 兄弟, 给个 Star 吧.

Disable

// 如果想使用系统手势,可以像下面那样. 
// If you want to use the system gestures, you can do the same as below.
#import "UIViewController+SJVideoPlayerAdd.h"
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    // use system 
    self.navigationController.useNativeGesture = YES;
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    // use custom 
    self.navigationController.useNativeGesture = NO;
}

Fade Area

// 如果想某个区域不触发手势, 可以这样做.
// If you want an area to not trigger gestures, you can do the same as below.
#import "UIViewController+SJVideoPlayerAdd.h"
- (void)viewDidLoad {
    [super viewDidLoad];

    self.sj_fadeArea = @[@(_btn.frame), @(_view2.frame)];
    // or
    self.sj_fadeAreaViews = @[_btn, _view2];
}

Latest podspec

{
    "name": "SJFullscreenPopGesture",
    "version": "1.2.2",
    "summary": "fullscreen pop gestures.",
    "description": "fullscreen pop gesture. System native gestures and custom gestures are free to switch.",
    "homepage": "https://github.com/changsanjiang/SJFullscreenPopGesture",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "SanJiang": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/changsanjiang/SJFullscreenPopGesture.git",
        "tag": "v1.2.2"
    },
    "source_files": "SJVideoPlayerBackGR/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "SJObserverHelper": []
    }
}

Pin It on Pinterest

Share This