Question

In OS3.0 a lot of plain table views have an initially hidden search bar that can be accessed by scrolling down to reveal it (e.g. mail, ipod).

Is it possible to do the same thing for a grouped table view?

Background:

I'm using a grouped table view as a static navigation menu (similar to the Things app). The content never changes, it's just a way to choose which view to push next. Above the table view, I have a search bar. I'd like that search bar to be hidden initially, as it doesn't look good and may also be confusing for new users - also because that seems to be the standard now.

Note, the search bar has nothing to do with the datasource of the table view it's in - it's not searching the contents of that table view. It's a search on a remote server. The results are displayed in a new view which is pushed on the stack. The search bar is intended to be just a quick way to get at that functionality.

Was it helpful?

Solution

UITableView inherits from UIScrollView, so set the bounds of the UITableView to move the search bar out of view when the UITableView is about to start displaying.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top