ios swift uiviewcontroller push present is determined to come in or come pop

override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        // display navbar
        self.navigationController?.setNavigationBarHidden(false, animated: true)
        
        if(isBeingPresented || isMovingToParent){
            print("======push")
        }else{
            print("======pop")
        }
    }

  

Guess you like

Origin www.cnblogs.com/rchao/p/12092785.html