HeroTransitions / Hero

Elegant transition library for iOS & tvOS
https://HeroTransitions.github.io/Hero/
MIT License
22.06k stars 1.73k forks source link

how to assign uiview id to navigationbar id #685

Open JayamuruganG opened 4 years ago

JayamuruganG commented 4 years ago

What did you do?

i want hidden my uiview to uinavigationBar

What did you expect to happen?

i cant assign uiview to uinavigationbar

What happened instead?

General Information

Demo Project

@IBAction func showAction(_ sender: UIButton){

    guard let nextVc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(identifier: "ViewController1") as? ViewController1 else {
                return
            }
            navigationController?.hero.isEnabled = true
            nextVc.hero.isEnabled = true
            self.hero.isEnabled = true

    navigationController?.heroNavigationAnimationType = .fade
            _ = nextVc.view
    self.searchView.heroID = "SearchView"
    self.searchView.hero.modifiers = [.translate(y:-100)]
    nextVc.navigationController?.navigationBar.heroID = "SearchView"
    navigationController?.pushViewController(nextVc, animated: true)

}