{"id":6962,"date":"2013-02-10T13:22:52","date_gmt":"2013-02-10T18:22:52","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=6962"},"modified":"2013-02-10T13:22:52","modified_gmt":"2013-02-10T18:22:52","slug":"sticky-ios-search-bar-and-section-header-code","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2013\/02\/10\/sticky-ios-search-bar-and-section-header-code\/","title":{"rendered":"Sticky iOS Search Bar and Section Header Code"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/fabiankr\/TableViewSearchBar\">Fabian Kreiser<\/a> demonstrates three different scrolling behaviors of a <code>UISearchBar<\/code> inside a <code>UITableView<\/code> (via <a href=\"https:\/\/twitter.com\/romainbriche\/status\/300658005555412992\">Romain Briche<\/a>):<\/p>\n<blockquote cite=\"https:\/\/github.com\/fabiankr\/TableViewSearchBar\"><ul>\n<li>\n<strong>Default<\/strong>: The search bar scrolls with the table view<\/li>\n<li>\n<strong>Top<\/strong>: The search bar scrolls with the table view but always stays at the top if you scroll the table view up<\/li>\n<li>\n<strong>Header<\/strong>: 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<\/li>\n<\/ul><\/blockquote>\n<p>The first is used by Mail, Music, and Videos; the second by Notes and GameCenter; and the third by Contacts.<\/p>","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[69,31,74,71],"class_list":["post-6962","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-ios","tag-opensource","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=6962"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6962\/revisions"}],"predecessor-version":[{"id":6963,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/6962\/revisions\/6963"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=6962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=6962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=6962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}