UISearchController.searchBar in UINavigationController with bar hidden animates off-screen
Originator: | greg | ||
Number: | rdar://17315600 | Date Originated: | 06/14/2014 |
Status: | Open | Resolved: | |
Product: | iOS SDK | Product Version: | 12A4265u |
Classification: | UI/Usability | Reproducible: | Always |
Summary: If presenting a UISearchController in a UINavigationController that has the navigation bar hidden, when animating after tapping in the UISearchBar, the bar scrolls off-screen. It appears to be subtracting the height that the navigation bar should be. Steps to Reproduce: (Attached) 1. Create a new MasterDetail template app for iPhone 2. Create a UISearchController property in MasterViewController (@property (strong) UISearchController *searchController;) 3. In MasterViewController's viewDidLoad, add: self.navigationController.navigationBarHidden = YES; self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; self.searchController.searchBar.frame = CGRectMake(0, 0, 320, 44); self.tableView.tableHeaderView = self.searchController.searchBar; 4. Run the app 5. Tap inside the search bar Expected Results: Search bar animates to the top of the screen. Actual Results: Search bar animates off-screen. Version: iOS 8 12A4265u Notes: Configuration: iPhone Simulator Attachments: 'SearchBarNavControllerBug.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!