Hello there.
I followed
this guide on adding a UISearchBar to my UITableView.
But there's a problem if I do the following things in this order:
1) initiate search
2) search for something that appears in many entries (so that the list of results is longer than the screen)
3) scroll down the list of results until the UISearchBar is not on the screen anymore
4) tap on an item to view the details
5) tap back
--> Now the keyboard and the results list are gone!
If you have the time, you can easily reproduce the problem by downloading the unmodified, original xcode project and running it:
http://sites.google.com/site/iphones...attredirects=0
You can change line 22 of RootViewController.m to something like
Code:
NSArray *countriesToLiveInArray = [NSArray arrayWithObjects:@"Iceland", @"Greenland", @"Switzerland", @"Norway", @"New Zealand", @"Greece2", @"Greece3", @"Greece4", @"Greece5", @"Greece6", @"Greece7", @"Greece", @"Greece", @"Greece8", @"Greece9", @"Greece10", @"Greece11", @"Greece12", @"Greece13", @"Greece14", @"Italy", @"Ireland", nil];
to get a longer list, and then search for something like "Gree". Then scroll down to Greece12 or so, tap it, and go back and see the bug.
This does ONLY happen with the
4.0 Simulator, but not with the 3.2 one!
Does anyone have a clue why this is happening? It's really odd and I can't figure out what is going wrong. I don't have a device yet so I wasn't able to try out the behaviour there.
I'd be very grateful if someone could download and inspect said project and try reproducing the bug. I'm clueless.
Thanks everyone!