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

# tableView(_:shouldUpdateFocusIn:)

Asks the delegate whether the focus update specified by the context is allowed to occur.

```
optional func tableView(_ tableView: UITableView, shouldUpdateFocusIn context: UITableViewFocusUpdateContext) -> Bool
```

## Parameters

`tableView`

A table view in which the focus update is occurring.

`context`

An instance of [`UIFocusUpdateContext`](/documentation/UIKit/UIFocusUpdateContext) class, contains metadata for the focus related update.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the focus should update; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The functionality of this delegate method is equivalent to overriding [`UITableView`](/documentation/UIKit/UITableView) class’s  [`shouldUpdateFocus(in:)`](/documentation/UIKit/UIFocusEnvironment/shouldUpdateFocus(in:)) method. This delegate method provides additional [`UITableView`](/documentation/UIKit/UITableView)-related information in its context parameter, such as the index paths for the previously and next focused views. Note that, these index paths are only available if their views are contained within the table view. To learn more about the information provided by the context, see [`UITableViewFocusUpdateContext`](/documentation/UIKit/UITableViewFocusUpdateContext).

---

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)