Typing in UISearchBar crashes my app
After burning an entire day struggling with this, it came down to a totally unrelated problem: a corrupted storyboard.
This SO question recommended finding which scene was corrupt and recreating it. Unfortunately there was no way for me to determine that, so after some trial and error, it ended up being the initial view controller in my storyboard, which happened to be a UINavigationController
. I deleted that, added it back in, and everything is golden.
Custom UITableViewCell causing UISearchBar to crash
I came across the same problem as yours too not too long ago. What I did to make mine work was instead of laying out my custom cell directly in the prototype cell, I created a separate .xib
file for it, set the prototype cells in my tableViewController
to 0 and did
let regularCell = UINib(nibName: "Cell", bundle: nil)
self.searchDisplayController!.searchResultsTableView.registerNib(regularCell, forCellReuseIdentifier: "Cell")
Related Topics
Swift: Load Custom Uiview from Xib Programmatically
iOS - Uinavigationcontroller, Hide Navigationbar
How to Keep the Header Cell Moving with the Tableview Cells in Swift 2.0
Wkwebview Blank After 'Successful' Https Nsurlrequest
Automatically Change Cell Height Based on Content - Swift
Swift iOS - Tag Collection View
Errortype' Is Not Convertible to 'Nserror'
Using Haneke to Cache Then Play Mp4 Files with Avplayer
How to Create a Pfquerytableviewcontroller with Parse in Swift
How to Automatically Create an Initializer for a Swift Class
Unusernotificationcenter.Current().Getdeliverednotifications Only Ever Returns an Empty Array
Get Center Coordinates from Mapkit and Display in Uilabel
Cocoa Singleton and Shared Instances
How to Display Only Limited Photos with PHPickerviewcontroller
Value of Type 'Error' Has No Member 'Code'