Sticky iOS Search Bar and Section Header Code
Fabian Kreiser demonstrates three different scrolling behaviors of a UISearchBar
inside a UITableView
(via Romain Briche):
- Default: The search bar scrolls with the table view
- Top: The search bar scrolls with the table view but always stays at the top if you scroll the table view up
- Header: The search bar usually stays at the top of the table view but scrolls with the table view if you scroll the table view up
The first is used by Mail, Music, and Videos; the second by Notes and GameCenter; and the third by Contacts.