First of all, I think it's good to know what an accessory is . A property accessoryis an instance property UITableViewCell(so you cannot define an accessory for UIButton). This is the view that appears on the right side of the cell in the normal state of the table. The default accessory style is none, which means that UITableViewCellthere is no additional look on the right side .
An additional action is a step that starts when you touch an accessory on the right side of the cell. Apple provides a set of predefined types (link below) of accessories. To support accessories, the accessory must track touches. There are currently two predefined accessories that make detailDisclosureButtonand detailButton.
A simple example demonstrating the use of accessories for actions:

( 'i', 'Detail'), . , .
. - UITableViewCell 'Accessory'. - , :
var accessoryType: UITableViewCellAccessoryType { get set }
. Apple :
https://developer.apple.com/documentation/uikit/uitableviewcellaccessorytype.