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

nav bar shows when app goes back to foreground #52

Open
l12ab opened this issue Oct 27, 2016 · 1 comment
Open

nav bar shows when app goes back to foreground #52

l12ab opened this issue Oct 27, 2016 · 1 comment

Comments

@l12ab
Copy link

l12ab commented Oct 27, 2016

  1. scroll up hide nav bar
  2. press home button let app into background
  3. and then press again

oh, the nav bar appears, this is what i dont expected

@galvana
Copy link

galvana commented Nov 12, 2016

To fix this issue I added some logic to the default case for applicationWillEnterForeground. It expands or contracts the views based on the currentState.

func applicationWillEnterForeground() {
    switch onForegroundAction {
    case .show:
        _ = navBarController.expand()
        _ = tabBarController?.expand()
    case .hide:
        _ = navBarController.contract()
        _ = tabBarController?.contract()
    default:
        switch currentState {
        case .Open, .Expanding:
            _ = navBarController.expand()
            _ = tabBarController?.expand()
        case .Closed, .Contracting:
            _ = navBarController.contract()
            _ = tabBarController?.contract()
        }
    }
}

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