Disable UITableViewCellAccessory
I want to disable the UITableViewCellAccessoryDetailDisclosure
button for certain rows in my table. I cannot seem to find any way to do this. I t开发者_如何学运维ried just doing:
cell.UITableViewCellAccessoryDetailDisclosureButton.enabled = NO;
But no luck. Does anyone know how to do this?
It's not the enabled
property that you seek. What you want to do is specify that there should be no accessory detail disclosure when you build the UITableViewCell
objects.
So, in your -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
, just set:
cell.accessoryType = UITableViewCellAccessoryNone;
and that will get rid of the accessory for that cell.
精彩评论