TransitionTreasury icon indicating copy to clipboard operation
TransitionTreasury copied to clipboard

OMNITransitionAnimation can't hide NavigationBar?

Open jimmyrogue opened this issue 8 years ago • 3 comments

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

jimmyrogue avatar Jul 02 '16 09:07 jimmyrogue

maybe you can try call:

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

DianQK avatar Jul 02 '16 13:07 DianQK

@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.

jimmyrogue avatar Jul 04 '16 06:07 jimmyrogue

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
    }
}

DianQK avatar Jul 04 '16 07:07 DianQK