UISearchBar error when entering Searchbar textbox

211 views Asked by At

I have found a strange error. I have been following this sample:

http://jduff.github.com/2010/03/09/throwing-a-uinavigationcontroller-uitabbarcontroller-and-uisearchbar-together/

I tested it and then tried to roll it in my app. It worked in the sample but not my app. In my app I would SIGABRT or BAD_ACCESS errors whenever I entered the textview inside the searchbar. The main difference was that I placed the Search on the second tab rather than the first. When I changed the taborder on my app to have the search on the first tab's navigation controller, it worked! It seems that unless I first enter the searchbar's textview. The object gets released and if I try to enter it later it fails. Very weird. I don't know enough about the objects here to say what the initialization sequence is but my guess is I need to do more initialization to get it to work.

1

There are 1 answers

0
Stas Zhukovskiy On

go through the article in the link once more. especially through the "Setting up the Project" part.

In the article everything is set for the "selected view controller" which is the first one. And you say you implement everything to the second tab. Make sure you didn't implement everything in the first one of your project.

Let me know if this helps. If not I'll figure out something else.