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

后端 未结 16 763
盖世英雄少女心
盖世英雄少女心 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:36

    This is what finally worked for me, as my project didn't exactly have a NavigationVC but instead, individual detached VC's. as xib files

    This code produced the bug:

    present(alertVC, animated: true, completion: nil)
    

    This code fixed the bug:

     if presentedViewController == nil{
            navigationController?.present(alertVC, animated: true, completion: nil)
        }
    

提交回复
热议问题