UISearchBar is laid out incorrectly and freezes when activated as a subview of a UITableView header view

Originator:ChuckMitchell
Number:rdar://15838198 Date Originated:16-Jan-2014 04:52 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.0.1
Classification: Reproducible:Always
 
Summary:
When I add a search bar inside a view that is in turn nested inside a table view I get an unexpected UI effect where the search bar shrinks horizontally and the cancel button becomes unclickable. I am still able to type characters and search.

Steps to Reproduce:
1. Create a new empty application.
2. In Builder create a navigation controller pointing to a table view.
3. Create a view as a table header (above the Table Cell View).
4. Drag a "Search Bar and Search Display Controller" into the view you just created.
5. Run the application.
6. Activate the search bar.

Expected Results:
The Search bar should not shrink, and the cancel button should still be active and let me return to the list.

Actual Results:
The search bar shrinks horizontally and the cancel button becomes inactive.

Version:
Broken on both
iOS7 7.0.4
iOS7 7.1b3

Notes:


Configuration:
This always occurs in iOS7, not 6 in the simulator and on device.

Attachments:
'TBLTableSearchExample.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!