0
votes

The app has a UIView with a table view and a UISearchbar on it. The searchbar delegate methods are in the view controller for the UIView. Everything appears to be hooked up correctly.

This searchbar works correctly in iOS 5, but not in iOS6. When touched, the searchbar brings up the keyboard, but typing on the keyboard has no affect; the textDidChange delegate method is never called.

This occurs only when running on an iPad. The difference between the view on an iPad versus the iPhone is that the UIView with the UITableView and UISearchbar runs in a popover on the iPad. On an iPhone, it runs as a separate view. In both cases, once the view is opened, a UINavigationController manages the view. All the navigation up and down the nav controller works fine in both devices; the only difference is that the UISearchBar does not work running in the popover.

Obviously, something has changed between iOS 5 and iOS 6, but I haven't been able to figure out what, or how to make the searchbar work in an iOS 6 popover.

Any help will be greatly appreciated!

2
you might find some clues here (it depends on the exact nature of your problem): stackoverflow.com/questions/12447875/…Rok Jarc
Thanks. I had looked at this, but my view is not the main window in the app, so I couldn't see how to apply it to my situation. Originally, I thought it was a delegate problem, but I realize that it's the connection between the UISearchbar and the keyboard. Nothing is going from the keyboard to the searchbar.johnz
Another bit of information I just discovered: the searchbar works when the app is run on an iPhone, but not on an iPad. The difference is that on the iPad, this particular view funs in a popover, where on the iPad, it does not. In both, the view is controlled by a UINavigationController. So this must be related to running the navigation controller in a popover, but I can't think why that would make a difference.johnz
Perhaps you should edit your question with this extra information (possibly changing the title also) and add a UISearchBar tag. Looks like you're close to the solution or at least core of the problem.Rok Jarc

2 Answers

0
votes

rokjarc is right. I have same problem. In my app'SearchBar Display Controller, SearchBar is not respond to keypad typing in ios6. But it is fine in ios5 simulater, ios6 simulater, iPhone 3GS, iPhone 4. In MainWindow.xib, 1. Click "Window" icon in "objects" Box. 2. Show Attribute inspector 3. Expend window attribute. 4. Check "Visible at Launch" and "Full Screen at Launch" 5. Clean build and run. 6. Good. OK?

0
votes

I just got the answer on my original problem. I discovered that the same thing was occurring in UITextFields and UITextViews. I sent the whole thing off to Apple Tech Support.

Turns out that you have to include this line of code:

[self.window makeKeyAndVisible];

in the application's delegate's didFinishLaunchingWithOptions: method. When I added this line, the problems went away.

Hope this helps.