UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
}
NSUInteger row =[indexPath row];
NSUInteger section = [indexPath indexAtPosition:0];
//cell.textLabel.text = [[firstSection objectAtIndex:section] objectAtIndex:row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
if ([cell.textLabel.text isEqualToString:@"Email"]) {
[cell.imageView setImage:[UIImage imageNamed:@"email.png"]];
cell.detailTextLabel.text = @"Email Us";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if ([cell.textLabel.text isEqualToString:@"Follow Us"]) {
[cell.imageView setImage:[UIImage imageNamed:@"twitter.png"]];
cell.detailTextLabel.text = @"Our Twitter";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if ([cell.textLabel.text isEqualToString:@"Like Us"]) {
[cell.imageView setImage:[UIImage imageNamed:@"facebook.png"]];
cell.detailTextLabel.text = @"Our Facebook";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if ([cell.textLabel.text isEqualToString:@"Orange"]) {
[cell.imageView setImage:[UIImage imageNamed:@"facebook.png"]];
cell.detailTextLabel.text = @"Our Facebook";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if ([cell.textLabel.text isEqualToString:@"Yellow"]) {
[cell.imageView setImage:[UIImage imageNamed:@"facebook.png"]];
cell.detailTextLabel.text = @"Our Facebook";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
[[cell textLabel] setText:contentForThisRow];
NSLog(@"<<< Leaving %s >>>", __PRETTY_FUNCTION__);
return cell;
}