Nam Vu
Nam Vu

Reputation: 5725

UISearchBar does not show keyboard on tap (only for Xcode 5.1, iOS 7)

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

Answers (1)

Vin
Vin

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.

https://developer.apple.com/library/ios/samplecode/TableSearch/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007848

Upvotes: 1

Related Questions