为UITableView加入索引
来源:互联网 发布:淘宝oem化妆品 编辑:程序博客网 时间:2024/06/09 20:15
//设置索引
- (NSArray *)sectionIndexTitlesForTableView:(UITableView*)tableView
{
if (tableView == myTableView) {
NSMutableArray *charArray = [[NSMutableArray alloc]initWithCapacity:0];
//加一个搜索索引
[charArray addObject:UITableViewIndexSearch];
[charArray addObject:@"中国"];
[charArray addObject:@"外国"];
return charArray;
}
return nil;
}
//解决加入索引图标混乱
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
{
if (index == 0) {
[tableView scrollRectToVisible:tableView.tableHeaderView.frameanimated:YES];
}
//返回的是section
return index-1;
}
- 为UITableView加入索引
- UITableView索引
- UITableView索引
- UITableView索引
- UITableView中间加入文字
- IOS-UIWebView 加入 UITableView
- 如何在python中为类加入索引器[]
- ios uitableview加入uiscrollview广告栏
- UITableView实现索引
- UITableView 索引的添加
- iOS UITableView索引选择
- 使用UITableView的索引
- 给UITableView 添加索引
- 加入目录网站索引
- 在UITableView右侧添加索引
- [IOS]UITableView分区+索引显示
- 自定义UITableView的右侧索引
- IOS UITableView索引排序功能
- 【java】Singal和SingalHandler用法
- rpm相关命令
- WinCE下内存申请API比较
- Clang -- from Wikipedia
- setlocal enabledelayedexpansion 理解
- 为UITableView加入索引
- 感同身受(身处相似的境遇,探索新的突破点)
- xenomai_驱动开发问题解决
- C#Base64 编码[转]
- 根据sheet1指定行数往sheet2中写数据
- 位置问题
- kettle链接mysql
- 利用构造函数在两个UIViewController之间传值
- SHOPNC V2.2正式版,SHOPNC V2.4企业版完全去除破解版权(顶部title版权- Powered by shopnc.net和底部版权)