TableSearch
This sample demonstrates how to use the UISearchDisplayController object in conjunction with a UISearchBar, effectively filtering in and out the contents of that table. If an iPhone/iPod Touch application has large amounts of table data, this sample shows how to filter it down to a manageable amount if memory usage is a concern or you just want users to scroll through less content in a table.
It shows how you can:
- Create a UISearchDisplayController.
- Use the new scopes on UISearchBar with a search display controller.
- Manage the interaction between the search display controller and a containing UINavigationController
(there is no code for this -- the navigation bar is moved around as necessary).
- Return different results for the main table view and the search display controller's table view.
- Handle the destruction and re-creation of a search display controller when receiving a memory warning.
Build Requirements
iOS SDK 4.0.
Runtime Requirements
iOS 4.0.
Using the Sample
Build and run TableSearch using Xcode. To run in the simulator, set the Active SDK to Simulator. To run on a device, set the Active SDK to the appropriate Device setting. When launched tap the search field and as you enter case insensitive text the list shinks/expands based on the filter text. An empty string will show the entire contents. To get back the entire contents once you have filtered the content, touch the search bar again, click the clear ('x') button and hit cancel.
Packaging List
AppDelegate.{h,m} - The application's delegate to setup its window and content.
MainViewController.{h,m} - Manages a table view to display a list of products, and manages a search bar to filter the product list.
Product.{h,m} - A simple model file to represent a product with a name and type.
main.m - Main source file for this sample.
Changes from Previous Versions
1.5 - Upgraded project to build with the iOS 4 SDK.
1.4 - Fixed problem with saving state during low memory warnings.
1.3 - Updated UISearchBar and UISearchDisplayController as nib objects.
1.2 - Upgraded to use UISearchDisplayController and iPhone OS 3.0.
1.1 - Minor user interface upgrades, no longer using UINavigationController; UISearchBar takes it's place.
1.0 - Updated for and tested with iPhone OS 2.0. First public release.
Copyright (C) 2008-2010 Apple Inc. All rights reserved.
没有合适的资源?快使用搜索试试~ 我知道了~
iphone应用开发之 search bar的实用 和table view的结合
共18个文件
png:5个
m:4个
h:3个
5星 · 超过95%的资源 需积分: 9 116 下载量 67 浏览量
2010-08-19
21:02:26
上传
评论 1
收藏 27KB ZIP 举报
温馨提示
这是在iphone xcode 下开发的一个实例 对与学习和理解search bar 和一些常用空间非常有帮助.
资源推荐
资源详情
资源评论
收起资源包目录
TableSearch.zip (18个子文件)
TableSearch
TableSearch.xcodeproj
project.pbxproj 14KB
AppDelegate.h 3KB
MainViewController.h 3KB
Product.m 3KB
en.lproj
MainWindow.xib 7KB
MainView.xib 10KB
ReadMe.txt 2KB
main.m 3KB
Product.h 3KB
Info.plist 905B
MainViewController.m 8KB
AppDelegate.m 4KB
Images
Icon-Small@2x.png 1010B
Icon.png 1007B
Icon-Small.png 918B
Icon@2x.png 1KB
iTunesArtwork.png 5KB
Prefix.pch 88B
共 18 条
- 1
罗家齐
- 粉丝: 45
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MyBatis进阶技巧:探索动态SQL的无限可能.md
- HM2300C-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- HM2300B-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 员工解除劳动合同申请表.pdf
- 物模块模型代码,前往设计物模块所属
- mybatis动态sql(使用<where>标签来处理多个查询条件)
- Java面试手册,助力大家面试过五关斩六将,面试成功
- HITK0303MP-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- mybatis动态sql之xml增删改查批量操作示例EmpMapper.xml
- C/C++内存检测工具Sanitizers
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页