修复了webView 侧滑返回的时候隐藏的导航栏重新显示的问题
This commit is contained in:
@@ -81,6 +81,7 @@
|
||||
_cycleScrollView.delegate = self;
|
||||
_cycleScrollView.showPageControl = NO;
|
||||
_cycleScrollView.autoScrollTimeInterval = 5.0;
|
||||
_cycleScrollView.tag = 9999;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
}
|
||||
|
@@ -228,8 +228,8 @@
|
||||
#pragma mark - JXPagerMainTableViewGestureDelegate
|
||||
|
||||
- (BOOL)mainTableViewGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
|
||||
///1000是外部的scrollView 1001是人气主播中的collectionView
|
||||
if (otherGestureRecognizer.view.tag == 1000 || otherGestureRecognizer.view == self.headerView || otherGestureRecognizer.view.tag == 1001) {
|
||||
///1000是外部的scrollView 1001是人气主播中的collectionView 9999是 开黑畅聊的轮播图
|
||||
if (otherGestureRecognizer.view.tag == 1000 || otherGestureRecognizer.view == self.headerView || otherGestureRecognizer.view.tag == 1001 || otherGestureRecognizer.view.tag == 9999) {
|
||||
return NO;
|
||||
}
|
||||
return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
|
||||
|
@@ -74,6 +74,8 @@ typedef NS_ENUM(NSUInteger, RightNavigationPushType){
|
||||
@property (nonatomic, strong) WKUserContentController *userContentController;
|
||||
///分享的内容
|
||||
@property (nonatomic,copy) NSDictionary *shareDic;
|
||||
///是否隐藏导航栏
|
||||
@property (nonatomic,assign) BOOL isHiddenNav;
|
||||
@end
|
||||
|
||||
NSString * const kJSOpenPurse = @"openPurse";
|
||||
@@ -98,6 +100,7 @@ NSString * const kProhibitRightSlip = @"prohibitRightSlip";
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.isHiddenNav = NO;
|
||||
[self initView];
|
||||
}
|
||||
|
||||
@@ -106,6 +109,11 @@ NSString * const kProhibitRightSlip = @"prohibitRightSlip";
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:self.isHiddenNav animated:animated];
|
||||
}
|
||||
|
||||
- (void)initView {
|
||||
if (self.navigationController.viewControllers.count > 1){
|
||||
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"common_nav_back"] style:UIBarButtonItemStylePlain target:self action:@selector(backButtonClick)];
|
||||
@@ -265,6 +273,7 @@ NSString * const kProhibitRightSlip = @"prohibitRightSlip";
|
||||
self.InitShowNavBlock(YES);
|
||||
return;
|
||||
}
|
||||
self.isHiddenNav = YES;
|
||||
if (self.navigationController) {
|
||||
[self.navigationController setNavigationBarHidden:YES];
|
||||
}
|
||||
|
Reference in New Issue
Block a user