Warning: Attempt to present * on * which is already presenting (null)

后端 未结 16 615
盖世英雄少女心
盖世英雄少女心 2021-02-03 17:14

This is my first application for iOS.

So I have a UIVIewController with a UITableView where I have integrated a UISearchBar and a

16条回答
  •  孤街浪徒
    2021-02-03 17:32

    The problem for me is that I was presenting two modals and I have to dismiss both and then execute some code in the parent window ... and then I have this error... I solved it seting this code in the dismiss o the last modal presented:

    self.dismiss(animated: true, completion: {
                    self.delegate?.callingDelegate()
                })
    

    in other words instead of just dismiss two times .. in the completion block of the first dismiss call delegate that will execute the second dismiss.

提交回复
热议问题