Before Xcode-11-Beta (ios13) below code for custom searchbar value for key to get textField working fine. Now getting below crash log.
'NSGenericException', reason: 'Access to UISearchBar's _searchField ivar is prohibited. This is an application bug'
- (UITextField *)textField
{
return [self valueForKey:@"_searchField"];
}
Any help appreciated.
The SDK now provides UISearchBar.searchTextField
so you can simply replace your private API implementation with the public API.
searchBar.searchTextField.backgroundColor = [UIColor blueColor];