Reputation: 15138
I have the following code for my custom cell:
ENSCustomCell *cell = (ENSCustomCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil)
{
cell = [[[ENSCustomCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellIdentifier] autorelease];
}
NSUInteger row = [indexPath row];
NSDictionary *ens;
ens = [ensList objectAtIndex:row];
NSDictionary *toDic = [ens objectForKey:@"an"];
NSString *toString = @"";
NSInteger count = 0;
for (NSDictionary *str in toDic)
{
count++;
toString = [NSString stringWithFormat:@"%@%@", toString, [str objectForKey:@"username"]];
if (count != toDic.count)
{
toString = [NSString stringWithFormat:@"%@%@", toString, @", "];
}
}
[cell setDataWithTitle:toString andSubject:[ens objectForKey:@"betreff"]];
return cell;
How to set the right arrow (UITableViewCellStyle) after the init? Is there a property or method (else then the initWithTyle) for this?
Upvotes: 0
Views: 472
Reputation: 723528
Since you said you're trying to set the right arrow, you're probably looking to change the accessory of the cell rather than the entire cell style. Use the cell's accessoryType
property:
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
Upvotes: 2