Setting a UISearchBar from a Xib does not show the search bar on iOS 5

Number:rdar://12707740 Date Originated:15/11/2012
Status:Closed Resolved:
Product:iPhone SDK Product Version:(6.0) Xcode 4.5.2
Classification:Other bug Reproducible:Always
I attached a sample app which demonstrates the problem.

I have a Xib that represents a UITableViewController with a UISearchBar in the UITableView table header.
If I run on iOS 6, it works.
If I run on iOS 5.1, the UISearchBar does not show.
I set the Xib file to be compatible with iOS 5.1 (with auto-layout disabled).

Steps to Reproduce:
- Create a new controller based on a UITableViewController with a xib file
- Add a UISearchBar in the UITableView header
- Run on iOS 6, works good.
- Run on iOS 5, the UISearchBar does not show.



Building the UISearchBar in the code works on both iOS 5 and 6.

By philippe.bernery at Nov. 21, 2012, 8:08 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!