Instance Method


Asks the delegate whether the cell at the specified index path is itself focusable.


optional func tableView(_ tableView: UITableView, canFocusRowAt indexPath: IndexPath) -> Bool



The table-view object requesting this information.


An index path locating a row in tableView.

Return Value

true if the row indicated by indexPath; otherwise, false.


The functionality of this delegate method is equivalent to overriding the cell's canBecomeFocused method. If true is returned, then the cell at the specified index path is focusable, meaning none of its contents can be focused. Returningfalse means the cell itself is not focusable, however this does not prevent any of its contents from being focused. If this method is not implemented, then the return value is assumed to be true.

See Also

Managing Table View Focus

func tableView(UITableView, shouldUpdateFocusIn: UITableViewFocusUpdateContext) -> Bool

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

func tableView(UITableView, didUpdateFocusIn: UITableViewFocusUpdateContext, with: UIFocusAnimationCoordinator)

Tells the delegate that a focus update specified by the context has just occurred.

func indexPathForPreferredFocusedView(in: UITableView) -> IndexPath?

Asks the delegate for the table view’s index path for the preferred focused view.