-
Notifications
You must be signed in to change notification settings - Fork 163
Crash when swiping away from a UITableViewController with an active UISearchController #63
Comments
hey @gca3020 |
That's strange. That's very similar to what I'm doing, except mine is crashing. Only when I have the search bar active. Other minor differences are that my table currently has no items in it (empty array), and that I'm moving tabs between two instances of the same TableVC, both with a search bar at the top. |
Some additional details on the exception: A Google search shows this, which looks similar: |
I am having the exact same issue with an UISearchBar. when it's in focus or firstResponder and I click on a different tab it crashes. |
any updates on this issue? |
This crash is cause by UISearchController, so you should consider dismissing the search before changing tab |
I had the similar issue. If you are hiding the search bar on tab switch make sure you are hiding it in the delegate function func carbonTabSwipeNavigation(_ carbonTabSwipeNavigation: CarbonTabSwipeNavigation, willMoveAt index: UInt) This will solve the problem I guess. I was playing with the constraint of the search bar. so I put the code in the above function and it worked well. |
As stated in the title. I have a single subclass of UITableViewController that I am instantiating multiple times (holding different subsets of data in each). I have a UISearchController initialized in the viewController, and the tableView.tableHeaderView is set as searchController.searchBar.
`
let searchController = UISearchController(searchResultsController: nil)
`
If I click into the search field and start searching, and then switch view controllers by swiping or clicking on a new one, I get a crash.
From the debugging output, it looks like there is an exception thrown:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected subviews'
The text was updated successfully, but these errors were encountered: