views:

85

answers:

1

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);
+1  A: 

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.

rickharrison
thanks. the reason I wanted to use the disclosure indicator was that it changed to white when the row was selected. there does not seem to be a way to change the accessoryView as soon as the cell is selected.
cannyboy
You could try changing the accessoryView in the willSelectRow. Not sure how that would work with the cell selection. If my answer did clear some things up for you, please accept it. Thanks!
rickharrison