While an existing transition or presentation is occurring; the navigation stack will not be updated

前端 未结 6 1193
孤城傲影
孤城傲影 2021-02-01 16:36

I have encountered this warning:

pushViewController:animated: called on while an existing transition or presentation is occurring; the navigation stack

6条回答
  •  北海茫月
    2021-02-01 16:58

    i am using dispatch_async and its working. i tried to navigate back but didn't worked because navigation stack will not be updated.

    let destVC = self.storyboard?.instantiateViewControllerWithIdentifier("HomeViewController") as! HomeViewController
        self.presentViewController(destVC, animated: true, completion: {() -> Void in
            dispatch_async(dispatch_get_main_queue(), {() -> Void in
                self.navigationController?.popViewControllerAnimated(true)!
            })
        })
    

提交回复
热议问题