UISearchBar crashes, but I don't know what's going on. From the code, there is no problem here.Attached is my crash log.
search_bar.barTintColor = .init(hex: 0xececec)
search_bar.tintColor = LightText1()
search_bar.placeholder = "Search Matches"
search_bar.searchBarStyle = .minimal
search_bar.backgroundImage = UIImage()
search_bar.delegate = self
if #available(iOS 13.0, *) {
search_bar.searchTextField.font = Secondary_Body1_Medium()
search_bar.searchTextField.backgroundColor = .clear
search_bar.searchTextField.textColor = LightText1()
search_bar.searchTextField.borderStyle = .none
search_bar.searchTextField.layer.cornerRadius = 4
search_bar.searchTextField.layer.masksToBounds = true
search_bar.searchTextField.backgroundColor = UIColor(hex: "#F7F7F7")
}