Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

OMNITransitionAnimation can't hide NavigationBar? #22

Open
jimmyrogue opened this issue Jul 2, 2016 · 3 comments
Open

OMNITransitionAnimation can't hide NavigationBar? #22

jimmyrogue opened this issue Jul 2, 2016 · 3 comments

Comments

@jimmyrogue
Copy link

Hi
I want hide my navigationbar in second viewcontroller so write something like this

ViewController One

let testView = XXXViewController()
navigationController?.tr_pushViewController(testView, method: ILTransition.OMNI(key: button))

**OMNI == OMNITransitionAnimation**
xxxxx.translucent = true
xxxxx.setBackgroundImage(UIImage(), forBarMetrics: .Default)
xxxxx.shadowImage = UIImage()

but this code not working

@DianQK
Copy link
Owner

DianQK commented Jul 2, 2016

maybe you can try call:

func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)
    navigationController?.setNavgationBar...
}

@jimmyrogue
Copy link
Author

@DianQK
thanks it works But...
StatusBar become translucent too and I don't know how to fix it.

override func preferredStatusBarStyle() -> UIStatusBarStyle

not working and add a UIView does't work too.

@DianQK
Copy link
Owner

DianQK commented Jul 4, 2016

You can check this preferredStatusBarStyle isn't called

extension UINavigationController {

    public override func childViewControllerForStatusBarHidden() -> UIViewController? {
        return self.topViewController
    }

    public override func childViewControllerForStatusBarStyle() -> UIViewController? {
        return self.topViewController
    }
}

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