Instance Property


A Boolean value that indicates whether the view is currently capable of being focused.


var canBecomeFocused: Bool { get }


The value of this property is true if the view can become focused; false otherwise.

By default, the value of this property is false. This property informs the focus engine if a view is capable of being focused. Sometimes even if a view returns true, a view may not be focusable for the following reasons:

  • The view is hidden.

  • The view has alpha set to 0.

  • The view has userInteractionEnabled set to false.

  • The view is not currently in the view hierarchy.