jjzjj

collationStringSelector

全部标签

iphone - UILocalizedIndexedCollat​​ion 的 sectionForObject :(id)object collationStringSelector:(SEL)selector method 选择器的作用是什么

我是iOS开发的初学者,正在经历this文档(关于使用索引列表配置TableView的iOS开发人员指南)我遇到了这个://Listing4.7for(State*theStateinstatesTemp){NSIntegersect=[theCollationsectionForObject:theStatecollationStringSelector:@selector(name)];theState.sectionNumber=sect;}我无法弄清楚选择器(@selector(name))及其用途,也无法找到在选择器中传递名称的方法,即name.我在谷歌上搜索示例以找到更好的