Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导航栏设置为透明色后变成了黑色 #86

Open
iBinbro opened this issue Sep 7, 2018 · 1 comment
Open

导航栏设置为透明色后变成了黑色 #86

iBinbro opened this issue Sep 7, 2018 · 1 comment

Comments

@iBinbro
Copy link

iBinbro commented Sep 7, 2018

代码如下:

AXWebViewController *webVC = [AXWebViewController sharedManagerWithUrl:@"http://www.baidu.com"];
    webVC.enabledWebViewUIDelegate = YES;
    webVC.showsToolBar = NO;
    webVC.showsBackgroundLabel = NO;
    if (AX_WEB_VIEW_CONTROLLER_iOS9_0_AVAILABLE()) {
        webVC.webView.allowsLinkPreview = YES;
    }
    webVC.navigationType = AXWebViewControllerNavigationBarItem;
    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:webVC];
    webVC.navigationController.navigationBar.translucent = NO;
    webVC.navigationController.navigationBar.barTintColor = [UIColor clearColor];
    webVC.navigationController.navigationBar.tintColor = [UIColor clearColor];
    
    self.window = [[UIWindow alloc] init];
    self.window.backgroundColor = [UIColor whiteColor];
    self.window.frame = [UIScreen mainScreen].bounds;
    self.window.rootViewController = nav;
    [self.window makeKeyAndVisible];

//webVC.navigationController.navigationBar.barTintColor = [UIColor clearColor];
这个如果设置成其他有色可正常显示,但是设置成透明色就会变成黑色,求解 o(╥﹏╥)o

@zhaokunhaoa
Copy link

webVC.navigationController.navigationBar.translucent = NO;
这里设置给YES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants