Instance Property

canBecomeFocused

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

Declaration

var canBecomeFocused: Bool { get }

Discussion

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.

See Also

Observing Focus

class var inheritedAnimationDuration: TimeInterval

Returns the inherited duration of the current animation.

var isFocused: Bool

A Boolean value that indicates whether the item is currently focused.