devedbox / AXWebViewController

AXWebViewController is a webViewController to browse web content inside applications. It’s a lightweight controller on iOS platform based on WKWebView (UIWebView would be the base Kit under iOS 8.0). It added navigation tool bar to refresh, go back, go forward and so on. It support the navigation style on WeChat. It is a simple-using and convenient web view controller using inside applications.
MIT License
798 stars 134 forks source link

0.7.2版本在 iOS 11上會有一些問題 #70

Open tentenlee100 opened 6 years ago

tentenlee100 commented 6 years ago

AXWebViewController版本: 0.7.2 Xcode版本: 9.2 iOS/OSX版本: 11.2.5 依赖管理工具(cocoapods)版本: 1.4.0

更新到0.7.2版本之後,在iOS 11上使用,網頁顯示會在navigationBar後面,contentInset設錯的感覺,可是手動滑一下後又是是正常的了。

將本版降回0.7.0之後就正常了。

code如下:

    AXWebViewController *vc = [[AXWebViewController alloc] initWithURL:url];
    vc.showsToolBar = NO;
    vc.showsBackgroundLabel = NO;
    vc.webView.scrollView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 49, 0);
    vc.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 49, 0);
    vc.maxAllowedTitleLength = 999;
    vc.navigationController.navigationBar.translucent = NO;
    vc.navigationType = AXWebViewControllerNavigationBarItem;
    vc.showsNavigationCloseBarButtonItem = NO;
    vc.showsNavigationBackBarButtonItemTitle = NO;

即使把這兩行刪除也是一樣的問題:

    vc.webView.scrollView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 49, 0);
    vc.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 49, 0);
DukeLenny commented 6 years ago

我在开发中也遇到了同样的问题,请问是什么原因导致的?如何解决?

tentenlee100 commented 6 years ago

@DukeLenny 指定版本 0.7.0是正常的

DukeLenny commented 6 years ago

这个我是知道的,我在项目中也用的0.7.0.但是0.7.0也有问题,比如:没网时点击重新加载网页不能重新加载.新版本是可以重新加载的.所以我希望这个框架的作者能够完善下这个框架,使之完全适配iOS11.

devedbox commented 5 years ago

这是个BUG,后续会优化。而且,这貌似是系统的一个BUG。。。

ronin66666 commented 5 years ago

在控制器中加入代码 self.automaticallyAdjustsScrollViewInsets = NO; self.edgesForExtendedLayout = UIRectEdgeNone; 完美解决返回上移的问题

devedbox commented 5 years ago

@LuckyLiang 可以提一个PR吗?

tentenlee100 commented 5 years ago

@devedbox 試過這方式,個人不建議,這樣navigationbar的毛玻璃效果就沒了