UISearchController persisting after segue

前端 未结 2 2138
隐瞒了意图╮
隐瞒了意图╮ 2020-12-03 06:55

I have an app with a UISearchController. This element of the UI is completely set up in code like this:

searchController = UISearchController(searchResultsCo         


        
2条回答
  •  萌比男神i
    2020-12-03 07:23

    If you manage your own transitions and use popToViewController to leave the view, provide the context on the searchController instead of the view

    searchController.definesPresentationContext = true
    

    or you will get an error

    popToViewController:transition: called on  while an existing transition or presentation is occurring; the navigation stack will not be updated
    

提交回复
热议问题