I am developing chat application using xmpp.I got gmail and Facebook contacts in a table.
But My table contains 3 section
-(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 @"";
}
here my problem is how can i differentiate gmail and Facebook contacts
1 Answer