开发者

UISearchaBar is disappearing from UITableView

I've a view controller (named it as SearchViewController) with UITableView and UISearchBar. UISearchB开发者_JAVA技巧ar is set to table as a header view. While searching in the table using this searchbar works great.

By selecting any one of the displayed search results, I can move to next view (named it as DetailsViewController). But after returning to the SearchViewController, magically the UISearchBar is disappeared and my app is crashed. I found the same code is working fine on iOS 3.1.2 but not on iOS 4.0 (no idea about 4.0.1 or 4.0.2).

I'll be really thankful, if anyone has a work around for this.


I always use an UINavigationBar and an UINavigationItem to display the UISearchBar. Setting the navigationItem.titleView to the searchBar works fine for me. (Don't forget to call [theSearchBar sizeToFit])

Please give us more information on the crash. What is the console output?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜