Some of my tableview cells has arrows,
I set arrows by
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
But In one of the table view cells I want to display a simple string or text rather then an arrow
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cell.textLabel.text isEqualToString:@"Version"]){
cell.accessoryType = UITableViewCellAccessoryNone;
}
}
How can I display a string at the most right side of the tableview cell?
Instead of setting
cell.accessoryType, you can setself.accessoryViewto anyUIView, for example to aUILabelthat you create with the text.