**TableViewSearchBar** is a small demo project that demonstrates the various scrolling behaviors of a *UISearchBar* inside a *UITableView* found in Apple's own apps.
The project has been made in order to answer [this stackoverflow question](http://stackoverflow.com/questions/14759506/ios-native-contacts-app-sticky-search-bar-and-section-header-behavior "iOS native Contacts App: sticky search bar and section header behavior").
There are three different behaviors in Apple's apps:
- **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 last one is only used in the Contacts app and is quite interesting. Take a look at [FKRHeaderSearchBarTableViewController.m](TableViewSearchBar/FKRHeaderSearchBarTableViewController.m "FKRHeaderSearchBarTableViewController.m") in order to see how it works in detail.
- - -
![Screenshot](screenshot.png "Screenshot")
![Screenshot Search](screenshot-search.png "Screenshot Search")
- - - - -
# License
MIT License
Copyright (c) 2013 Fabian Kreiser
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
yxqyrh
- 粉丝: 8
- 资源: 11
最新资源
- Java毕设项目:基于spring+mybatis+maven+mysql实现的会员积分商城管理系统分前后台【含源码+数据库+毕业论文】
- 基于Java技术的下拉导航菜单设计源码
- Java毕设项目:基于spring+mybatis+maven+mysql实现的票务管理系统分前后台【含源码+数据库+毕业论文+开题报告】
- 基于开源语音识别模型whisper的Unity插件设计源码
- 基于Java语言的TaogLi高校家教平台设计源码
- Java毕设项目:基于spring+mybatis+maven+mysql实现的农产品仓库管理系统【含源码+数据库+毕业论文+开题报告】
- 基于Winsock的拦截与修改64位及32位封包的PacketEditor设计源码
- PHP性能检测扩展XHProf与FirePHP线上调试工具详解
- 基于Java语言的RxTool设计源码集合
- 基于CSS和JavaScript的IT知识图谱设计源码
- 基于SaToken轻量级Java权限认证的XrSaTokenVue Vue设计源码
- 基于Java和安卓基础知识的简易记事本设计源码
- Java毕设项目:基于spring+mybatis+maven+mysql实现的健康综合咨询问诊平台预约挂号管理系统分前后台【含源码+数据库+毕业论文】
- 基于SpringBoot+Vue前后端分离技术的在线购物商城设计源码
- 基于Vue和JavaScript的掌上生活超市小程序配送解决方案设计源码
- Java毕设项目:基于spring+mybatis+maven+mysql实现的农家乐信息平台管理系统【含源码+数据库+开题报告+毕业论文+答辩PPT】
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈