Dismiss pushed view from within Navigation Controller

后端 未结 6 1416
北恋
北恋 2021-02-01 04:40

I have a Navigation Controller with a View Controller displaying a button. The button is linked to another View Controller using a push segue which automatically adds a top navi

6条回答
  •  逝去的感伤
    2021-02-01 05:19

    If NavViewController is used with UIModalPresentationFullScreen then the below line will work

    self.navigationController?.dismiss(animated: true, completion: nil)
    

提交回复
热议问题