Updated way to find the textField from searchBar and hide the “x” symbol rather than “cancel” button :
your_SearchBar.searchTextField.clearButtonMode = UITextFieldViewModeNever;