我正在使用 xmpp 开发聊天应用程序。我在表格中获得了 gmail 和 Facebook 联系人。但我的表包含 3 个部分
-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)sectionIndex
{
NSArray *sections = [[self fetchedResultsController] sections];
if (sectionIndex < [sections count])
{
id <NSFetchedResultsSectionInfo> sectionInfo = [sections objectAtIndex:sectionIndex];
int section = [sectionInfo.name intValue];
switch (section)
{
case 0 : return @"Available";
case 1 : return @"Away";
default : return @"Offline";
}
}
return @"";
}
我的问题是如何区分 gmail 和 Facebook 联系人