关于uisearchDisplayController
2016-03-23 16:02
148 查看
1. 使用用自定义cell tableview 和 searchResultsTableView 都必须同时注册该cell
[self.tableView registerNib:[UINib nibWithNibName:@"LPQuestionCell"bundle:nil] forCellReuseIdentifier:@"LPQuestionCell"]; [self.searchDisplayController.searchResultsTableView registerNib:[UINib nibWithNibName:@"LPQuestionCell"bundle:nil] forCellReuseIdentifier:@"LPQuestionCell"];
2. uisearchDisplayController 按钮cancel 替换中文
- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller{ [_searchBar setShowsCancelButton:YES]; for (UIView *v in [[_searchBar subviews][0] subviews] ) { if ([v isKindOfClass:[UIButton class]]) { [(UIButton *)v setTitle:@"取消" forState:UIControlStateNormal]; } }}
相关文章推荐
- 深度解析Java8 – AbstractQueuedSynchronizer的实现分析(上)
- ios开发基础--滚动视图(UIScrollView)
- UIview和calaver的区别和联系
- Confluence5.1 最新版的安装&破解&汉化
- iOS推送 之 本地通知UILocalNotification
- iOS UIView的drawRect方法 - setNeedsDisplay和setNeedsDisplayInRect.
- Timer搭配TimerTask与Handler使用(更新UI)
- UIViewContentMode各类型效果
- OC学习——OC中的@protocol(@required、@optional)、代理设计模式
- return,continue,break的用法与区别
- 最棒的10款MySQL GUI工具
- 蓝牙
- 扣丁学堂笔记第06天高级UI组件(二)
- UI设计工具篇之Colorfavs颜色搭配在线工具
- easyUI Layout自适应窗口大小
- iOS UIView的几个layout方法-layoutSubviews、layoutIfNeeded、setNeedsLayout
- 【Gradle】配置 build.gradle
- spoj 375 Query on a tree (树链剖分)
- hdu1159/poj1458 Common Subsequence 动态规划
- Mysqli_query