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

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

    In my case I was trying to present a UIAlertController at some point in the app's lifetime after using a UISearchController in the same UINavigationController.

    I wasn't using the UISearchController correctly and forgot to set searchController.isActive = false before dismissing. Later on in the app I tried to present the alert but the search controller, though not visible at the time, was still controlling the presentation context.

提交回复
热议问题