iosobjective-ciphoneuitableviewaccessoryview

Can a standard accessory view be in a different position within a UITableViewCell?


I want my accessory to be in a slightly different place than normal. Is it possible? This code has no effect:

cell.accessoryType =  UITableViewCellAccessoryDisclosureIndicator;
cell.accessoryView.frame = CGRectMake(5.0, 5.0, 5.0, 5.0);

Solution

  • No, you cannot move where the accessory view is. As an alternative you can add a subview like the following;

    [cell.contentView addSubview:aView];
    

    Also, by setting the accessoryView property equal to something, the accessoryType value is ignored.