Commit b35b13d72f876d4ff2ab281cc29879717542f3b8

Authored by 梁星国
1 parent 5681b5f5

提交0.0.22_更改网页偏移问题

CNLiveServiceCenterModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveServiceCenterModule' 10 s.name = 'CNLiveServiceCenterModule'
11 - s.version = '0.0.21' 11 + s.version = '0.0.22'
12 s.summary = '网家家企业端服务中心模块' 12 s.summary = '网家家企业端服务中心模块'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveServiceCenterModule/Classes/CNLiveServiceCenterModule/Controller/CNLiveBCreatorViewController.m
@@ -61,9 +61,10 @@ @@ -61,9 +61,10 @@
61 [self.view addSubview:progress]; 61 [self.view addSubview:progress];
62 self.progressView = progress; 62 self.progressView = progress;
63 63
  64 + self.extendedLayoutIncludesOpaqueBars = YES;
64 65
65 self.view.backgroundColor = [UIColor whiteColor]; 66 self.view.backgroundColor = [UIColor whiteColor];
66 - WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, KScreenHeight)]; 67 + WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, kNavigationBarHeight, kScreenWidth, KScreenHeight - kNavigationBarHeight)];
67 [self.view addSubview:webView]; 68 [self.view addSubview:webView];
68 webView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; 69 webView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
69 [webView addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionNew context:nil]; 70 [webView addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionNew context:nil];
@@ -78,6 +79,17 @@ @@ -78,6 +79,17 @@
78 79
79 self.wkwebView = webView; 80 self.wkwebView = webView;
80 81
  82 + if (@available(iOS 11.0, *)) {
  83 +
  84 +   self.wkwebView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  85 +
  86 + } else {
  87 +
  88 +     self.automaticallyAdjustsScrollViewInsets = NO;
  89 +
  90 + }
  91 +
  92 +
81 } 93 }
82 94
83 - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context{ 95 - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context{