Warning: Attempt to present * on * whose view is not in the window hierarchy - swift

前端 未结 17 998
花落未央
花落未央 2020-11-30 22:03

I\'m trying to present a ViewController if there is any saved data in the data model. But I get the following error:

Warning: A

17条回答
  •  执念已碎
    2020-11-30 22:15

    The previous answers relate to the situation where the view controller that should present a view 1) has not been added yet to the view hierarchy, or 2) is not the top view controller.
    Another possibility is that an alert should be presented while another alert is already presented, and not yet dismissed.

提交回复
热议问题