<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableViewDelegate/tableView(_:accessoryButtonTappedForRowWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITableViewDelegate(im)tableView:accessoryButtonTappedForRowWithIndexPath:"
  },
  "title" : "tableView(_:accessoryButtonTappedForRowWith:)"
}
-->

# tableView(_:accessoryButtonTappedForRowWith:)

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

```
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.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)