Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

toolbarHidden #63

Open
codwam opened this issue Oct 23, 2016 · 1 comment
Open

toolbarHidden #63

codwam opened this issue Oct 23, 2016 · 1 comment

Comments

@codwam
Copy link

codwam commented Oct 23, 2016

I have some questions about DZNWebViewController while push it then pop it:

  1. toolbar not hidden.
  2. progressView not hidden while request unfinished.
  3. networkActivityIndicatorVisible not hidden.

My Subclass solution:

  • (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];

    self.navigationController.toolbarHidden = YES;
    }

  • (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    // In viewWillDisappear do this can't hide while webview still request, may be KVO??
    UIProgressView *progressView = [self valueForKey:@"progressView"];
    if (progressView) {
    [progressView removeFromSuperview];
    progressView = nil;
    }

    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    }

@gonft
Copy link

gonft commented Mar 2, 2017

Add Subclass solution:

override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        
        self.automaticallyAdjustsScrollViewInsets = false
        self.navigationController?.hidesBarsOnSwipe = false
        self.navigationController?.hidesBarsWhenKeyboardAppears = false
        self.navigationController?.hidesBarsWhenVerticallyCompact = false
        
        self.navigationController?.setToolbarHidden(true, animated: false)
}

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

No branches or pull requests

2 participants