UISearchController doesn't hide view when pushed

后端 未结 1 491
滥情空心
滥情空心 2021-02-13 12:11

I am using UISearchController to display a search bar and results within a UITableView. I managed to set it up correctly, but when I search the results and then select one of th

1条回答
  •  执笔经年
    2021-02-13 13:08

    Put this in your caller's viewDidLoad:

    Swift:

    self.definesPresentationContext = true
    

    Objective-C:

    self.definesPresentationContext = YES;
    

    This solved the problem for me.

    0 讨论(0)
提交回复
热议问题