AXWebViewController icon indicating copy to clipboard operation
AXWebViewController copied to clipboard

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

Open tentenlee100 opened this issue 6 years ago • 7 comments

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);

tentenlee100 avatar Mar 02 '18 11:03 tentenlee100

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

DukeLenny avatar Jun 15 '18 09:06 DukeLenny

@DukeLenny 指定版本 0.7.0是正常的

tentenlee100 avatar Jun 15 '18 09:06 tentenlee100

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

DukeLenny avatar Jun 15 '18 09:06 DukeLenny

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

devedbox avatar Sep 01 '18 10:09 devedbox

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

ronin66666 avatar Sep 12 '18 09:09 ronin66666

@LuckyLiang 可以提一个PR吗?

devedbox avatar Sep 12 '18 09:09 devedbox

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

tentenlee100 avatar Sep 13 '18 08:09 tentenlee100