TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jan 2018 |
Maintained by changsanjiang.
自定义全屏返回手势. 系统原生手势和自定义手势随意切换. 适用于带有视频播放器的App.
Customize full-screen return gestures. System native gestures and custom gestures are free to switch. App for App with video player.
pod 'SJVideoPlayerBackGR'
如果好用, 兄弟, 给个 Star 吧.
// 如果想使用系统手势,可以像下面那样.
// 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;
}
// 如果想某个区域不触发手势, 可以这样做.
// 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];
}