0

I am currently programming an app that uses SWRevealViewController. The frontViewController comprises of a navigation bar with a search bar in it as well as a table view that gets filtered by this search bar (UISearchController/UISearchBar). The rearViewController has a list of buttons to go to different viewControllers of the app.

Something very odd is happening. When I search for an item in the list and then press a button in the navigation drawer (rearViewController), I call a function in the frontViewController to push a new viewController on the stack. The new view shows up. Unfortunately, when I pop this view off of the stack... The tableView is black and only the navigation bar with the search bar still exists. It should be noted that when I return to the frontViewController, viewDidLoad: is called.

If I don't search for anything and then press a button in my nav drawer and then return to the frontViewController nothing goes wrong. The table view is visible.

Any tips/solutions? Thanks in advance.

user2253546
  • 575
  • 1
  • 8
  • 18

1 Answers1

0

The same happened to me and I solved it. You should set self.definesPresentationContext = YES in the view controller that contains the search controller.