开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜