I have a UISearchBar as seen below. How can I change the text color for the cancel button?
You can take advantage of the iOS Runtime Property _cancelButton to achieve this.
UIButton *cancelButton = [searchBar valueForKey:@"_cancelButton"];
[cancelButton setTitleColor:[UIColor yourColor] forState:UIControlStateNormal];
Unable to change UISearchBar cancel button title color after changing it's text.