To explain what I'm looking for I'll give an example: In the Contacts app, when you click the Search field in the first row of the table view it will smoothly take over the entire screen (minus the status bar) including the Navigation Controller's title bar.
Edit: I've also realized that I'm pretty sure this is related to the UISearchDisplayController being within a UITableView which is within an NavigationController which is within a TabBarController. The problem is that the search display will only take up the tableviews size and not the navigation controller.
I've mimicked this in my program by using UIView animations and resizing the entire navigation controller's frame to start above the visible screen's view. See below:
-(void)SetNavContTitleVis:(BOOL)ishidden {
[UIView beginAnimations:@"frame" context:nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration: 0.3];
CGRect frameIn;
if (ishidden) {
frameIn = CGRectMake(0,-46,320,480);
} else {
frameIn = CGRectMake(0,0,320,480-46);
}
self.parentViewController.view.frame=frameIn
[UIView commitAnimations];
}
This works fine and gets the job done but it feels like a hack. Is there any simpler way to do this with search display controllers? I feel that this is a hack that will get me into trouble in the future if display sizes change or the Apple tablet comes out etc. I've looked around for a while but haven't found any simple setting that will force the UISearchDisplayController to take up the navigation controller's title bar smoothly.