Reputation: 5725
This is my source code
[search setFrame:CGRectMake(listView.frame.origin.x, listView.frame.origin.y + 2,215, 52)];
[search setPlaceholder:@"Search"];
search.barTintColor = [UIColor colorWithRed:230/255.0f green:230/255.0f blue:230/255.0f alpha:1.0f];;
[search setTranslucent:NO];
search.delegate = self;
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor blackColor]];
UITextField *txfSearchField = [search valueForKey:@"_searchField"];
txfSearchField.backgroundColor = [UIColor whiteColor];
It is working with iOS 5,6,7 on Xcode 5.0
After updating xcode to 5.1, my uisearchview does not show the keyboard in iOS 7 and iOS 7.1 but with iOS 6 and earlier, it works.
I have no idea about the solution.
Could you please give me some solutions?
Thank you
Upvotes: 0
Views: 1056
Reputation: 454
I had the same issue. If you are using the storyboard, I think this will help you. Download the sample code given here.
Check out following links also.
https://stackoverflow.com/a/19374960/3223088 Check out this answer for issues regarding UISearchBar
If you want your view to be defined programmatically: http://ruchiram4.blogspot.in/2013/12/ios-7-uisearchbar-issue.html
Upvotes: 1