Misplaced UISearchBar when using UISearchDisplayController
Originator: | serieuxchat | ||
Number: | rdar://14414030 | Date Originated: | 11-Jul-2013 |
Status: | Closed | Resolved: | |
Product: | iOS SDK | Product Version: | 7.0 |
Classification: | Bug | Reproducible: | Yes |
When UISearchDisplayController is used, UISearchBar is misplaced and has an incorrect frame after the search has ended. Steps to Reproduce: - Create a view controller with a table view. - Place this view controller inside a UINavigationController. - Use a custom table header view. - Make UISearchBar a subview of that custom table header view. Don't use a scope bar (default). The frame of UISearchBar must be (0,0, 320, 44). - Make use of UISearchDisplayController to initiate the search. - When the search has started, the UISearchBar is moved up and becomes active. At this stage UISearchBar is actually moved to a different parent view (which is managed by UISearchDisplayController). - Cancel the search. Expected Results: - UISearchBar must be moved to its original parent view. - UISearchBar must have its original frame (0,0, 320, 44). Actual Results: - UISearchBar is NOT moved to its original parent view (which is the custom table header view mentioned above). Instead it's added a direct subview of UITableView (incorrect!). - The frame of UISearchBar is not restored to its original value. Instead, it becomes (0,0, 320, 88) (incorrect). Regression: Notes: - I was NOT using story boards and created the views programmatically.
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!