My problem is similar as [this](https://stackoverflow.com/questions/2934761/uitableviewcell-allowing-selective-deletion):

But I want to show accessoryView with DetailDisclosureButton only for cells that have details.

I have written some codes, but I don´t know in which method to put it.

```
if (totalcount == 0 && totalcount2 == 0)
{
    cell.accessoryType = UITableViewCellAccessoryNone;
}

else 
{
    cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
}

```

totalcount and totalcount2 is count of two mutable arrays that tell me whether cells have details or not.

Please ask me if my question is not clear, thank you.