我想在我的应用程序中创建一个自定义联系人列表,提供与标准联系人列表类似的 A-Z 跳转列表。
这可以用 TableView 实现吗?
有一个关于如何执行此操作的综合教程《表视图编程指南》 https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/TableView_iPhone/CreateConfigureTableView/CreateConfigureTableView.html,称为“填充索引列表”。
此外,如果您还需要具有搜索功能(放大图标),有两个写得很好的解决方案:
- http://iamthewalr.us/blog/2009/12/uisearchdisplaycontroller-and-uilocalizedindexedcollation/ http://iamthewalr.us/blog/2009/12/uisearchdisplaycontroller-and-uilocalizedindexedcollation/
- http://lukeredpath.co.uk/blog/using-uilocalizedindexedcollation-with-searchable-table-views.html http://lukeredpath.co.uk/blog/using-uilocalizedindexedcollation-with-searchable-table-views.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)