Reputation: 2923
I have an exception in iOS6:
-[UISearchBar setBarTintColor:]: unrecognized selector sent to instance 0xad94250
but I don't have this method in my code. How can I solve this?
Upvotes: 0
Views: 913
Reputation: 4671
barTintColor available from iOS 7 and above, so it will work for iO7 and above only
@property(nonatomic,retain) UIColor *barTintColor NS_AVAILABLE_IOS(7_0) UI_APPEARANCE_SELECTOR; // default is nil
For iOS 6.1 and lower you have to use
@property(nonatomic,retain) UIColor *tintColor;
Upvotes: 5
Reputation: 2923
I forgot about the properties.
self.searchBar.barTintColor = [UIColor whiteColor];
Upvotes: 0