【发布时间】:2015-10-14 08:15:56
【问题描述】:
-(NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
if (_segment.selectedSegmentIndex==0)
{
return sortedKeys;
}
else
{
return sortedKeys1;
}
}
我使用此代码,但如果名称不存在,我不想要部分标题,现在它给我所有部分标题
【问题讨论】:
-
你是否尝试返回 0 个部分?
-
是的,我在 numberrowsinsection 中返回 0
-
我的意思是 numberofsection,而不是 numberrowsinsection。
-
nop 我返回他们的数组
-
你能在 numberofsection 中发布你返回的行吗?
标签: ios objective-c iphone searchbar