---
title: "tableView(_:accessoryButtonTappedForRowWith:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdelegate/tableview(_:accessorybuttontappedforrowwith:)"
---

# tableView(_:accessoryButtonTappedForRowWith:)

Tells the delegate that the user tapped the detail button for the specified row.

## Declaration

```swift
optional func tableView(_ tableView: UITableView, accessoryButtonTappedForRowWith indexPath: IndexPath)
```

## Parameters

- `tableView`: The table view informing the delegate of this event.
- `indexPath`: The index path of the row whose detail button was tapped.

## Mentioned in

Handling row selection in a table view

## Discussion

Discussion Use this method to respond to taps in the detail button accessory view of a row. The table view does not call this method for other types of accessory views.
