IOS UITableView
来源:互联网 发布:广告公司用到的软件 编辑:程序博客网 时间:2024/05/20 01:44
我只能说,UITableView真是强大,原来通讯录右边的索引,tableView以后自带。
通过设置来个dataSource方法
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{ return [[UILocalizedIndexedCollation currentCollation] sectionIndexTitles];}
- (NSString *)tableView:(UITableView *)tableViewtitleForHeaderInSection:(NSInteger)section{ return [[[UILocalizedIndexedCollation currentCollation] sectionTitles] objectAtIndex:section];}
- (NSInteger)tableView:(UITableView *)tableViewsectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{ return [[UILocalizedIndexedCollation currentCollation] sectionForSectionIndexTitleAtIndex:index];}
<pre code_snippet_id="473716" snippet_file_name="blog_20140923_1_384235" name="code" class="objc" style="color: rgb(51, 51, 51); font-size: 20px; line-height: 30px;">[[UILocalizedIndexedCollation currentCollation] sectionIndexTitles]对应不同语言的结果
http://code4app.com/ios/Contacts-Multi-Picker/5052a2396803fa8c31000000
Locale Section Index Titles
en_US A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, #
ja_JP A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, あ, か, さ, た, な, は, ま, や, ら, わ, #
sv_SE A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Å, Ä, Ö, #
ko_KO A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, ㄱ, ㄴ, ㄷ, ㄹ, ㅁ, ㅂ, ㅅ, ㅇ, ㅈ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ, #
AR_sa A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, آ, ب, ت, ث, ج, ح, خ, د, ذ, ر, ز, س, ش, ص, ض, ط, ظ, ع, غ, ف, ق, ك, ل, م, ن, ه, و, ي, #
UITableViewIndexSearch(可以用title == UITableViewIndexSearch 来判断,是一个NSString)
If the data source includes this constant string in the array of strings it returns in sectionIndexTitlesForTableView:, the section index displays a magnifying glass icon at the corresponding index location. This location should generally be the first title in the index.
这个就是一个放大镜图标,显示在通讯录右边缩影的第一个,也只能放在第一个才行,也只能在sectionIndexTitlesForTableView:中返回的数组中的第一个。作用是什么?只是显示?可以自己设置作用,比如点击后,出现搜索界面框。
- IOS UITableview
- ios UITableView
- iOS- UITableView
- ios UITableView
- IOS UITableView
- IOS UITableView
- Ios-UITableView
- iOS UITableView
- iOS UITableView
- IOS-UITableView
- IOS UITableView
- iOS-------UITableView
- iOS UITableView
- iOS UITableView
- ios UITableView分页加载
- IOS UITableView下拉刷新
- IOS控件UITableView详解
- ios UITableView分页加载
- java处理高并发高负载类网站的优化方法
- hdu 2604 矩阵快速幂模板题
- Android驱动中的Kconfig文件与Makefile文件
- 样式表以及Color.xml文件『Android系列六』
- Oracle错误代码大全
- IOS UITableView
- 乐视笔试题
- json简单格式转树状结构 工具方法
- android:screenOrientation的说明
- PHP运行模式(cgi,fast-cgi,cli,web模块模式及php-fpm说明)
- Android的AlarmManager服务
- MyEclipse的调试技巧
- JVM Class 文件结构详解二
- SVN客户端的使用