Giter Site home page Giter Site logo

Comments (8)

Bretra avatar Bretra commented on July 28, 2024
  • (void)updateNavigationItems {
    if (self.webView.canGoBack) {
    self.navigationController.interactivePopGestureRecognizer.enabled = NO;
    if (self.showCloseNavLeftItem){
    [self.navigationItem setLeftBarButtonItems:@[self.backNavLeftItem, self.closeNavLeftItem] animated:NO];
    }else{
    [self.navigationItem setLeftBarButtonItems:@[self.backNavLeftItem] animated:NO];
    }
    } else {
    self.navigationController.interactivePopGestureRecognizer.enabled = YES;
    [self.navigationItem setLeftBarButtonItems:@[] animated:NO];
    }
    }

修改成这样子了

from jxbwkwebview.

Bretra avatar Bretra commented on July 28, 2024

self.backImagePath = @"";
设置这个未空无效,但是设置closeImagePath却可以

from jxbwkwebview.

xiubojin avatar xiubojin commented on July 28, 2024

好的,感谢提出的两个问题,我会尽快修复好。

from jxbwkwebview.

xiubojin avatar xiubojin commented on July 28, 2024

设置返回图片和关闭图片的代码是一样的,我这边试了没问题,你看看你那边是不是图片路径设置的有问题。

from jxbwkwebview.

Bretra avatar Bretra commented on July 28, 2024

我这边设置图片的路径为nil,是不让他现实出来。为什么这样子设置,正是因为通过addchildviewcontroller的方法来添加JXBWebViewController,在父vc里面,返回按钮就出现了,这个问题比较重要,正是第一个图片现实的那样

from jxbwkwebview.

Bretra avatar Bretra commented on July 28, 2024

显示返回按钮,和显示x按钮,你应该在JXBWebViewController里面进行判断下,我看了源码里面并没有进行判断关于vc的,只是进行了判断是否可以返回的这个事件

from jxbwkwebview.

Bretra avatar Bretra commented on July 28, 2024

self.navigationController.interactivePopGestureRecognizer.enabled = YES;
[self.navigationItem setLeftBarButtonItems:@[self.backNavLeftItem] animated:NO];
if (self.presentingViewController) {
//modal进来的
NSLog(@"modal进来的");
}else {
//非modal进来
if ([self.navigationController.viewControllers containsObject:self]) {
//push进来的
NSLog(@"push进来的");
}else {
//addchildViewController方式进来的
NSLog(@"addchildViewController方式进来的");
[self.navigationItem setLeftBarButtonItems:nil animated:NO];
}
}

添加这段代码后 你那边测试下,我这边测试OK的

from jxbwkwebview.

xiubojin avatar xiubojin commented on July 28, 2024

嗯,最新的代码已经改成这个了。

from jxbwkwebview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.