Warning: Attempt to present on <…> which is already presenting (null)

后端 未结 4 867
孤城傲影
孤城傲影 2021-02-07 02:00

I have a long press gesture set on a UITableView that presents a UIAlertController containing the cell\'s text. When the UIAlertController

4条回答
  •  一生所求
    2021-02-07 02:27

    I have had the same issue. I was able to fix it by this code:

            if self.presentedViewController == nil {
                self.present(Alert, animated: true, completion: nil)
            }
            else {
                self.dismiss(animated: false, completion: nil)
                self.present(Alert, animated: true, completion: nil)
            }
    

提交回复
热议问题