Interface UIFocusItem

    • Method Detail

      • canBecomeFocused

        boolean canBecomeFocused()
        Indicates whether or not this item is currently allowed to become focused. Returning NO restricts the item from being focusable, even if it is visible in the user interface. For example, UIControls return NO if they are disabled.
      • didHintFocusMovement

        default void didHintFocusMovement​(@NotNull
                                          @NotNull UIFocusMovementHint hint)
        Called whenever this focus item is hinting to the user a focus movement might occur. The provided object is mutated by the focus engine whenever the user's finger moves. API-Since: 12.0
      • frame

        CGRect frame()
        The geometric frame of this item, represented in the `coordinateSpace` of the UIFocusItemContainer in which it is contained. API-Since: 12.0
      • focusEffect

        @Nullable
        default @Nullable UIFocusEffect focusEffect()
        Describes a visual effect to apply when this item is focused. When not implemented, the system may create a default effect for this item. Returning nil indicates that the system should not apply any visual effects, and that the app will handle applying the appropriate visuals. API-Since: 15.0
      • focusGroupPriority

        default long focusGroupPriority()
        The priority this item has in its focus group. The higher the priority, the more likely it is to get picked when focus moves into this group. Note: this method can only be used to increase an item's priority, not decrease it. For example if an item is currently selected, the actual priority of this item will be determined by MAX(focusGroupPriority, UIFocusGroupPrioritySelected). API-Since: 15.0
      • isTransparentFocusItem

        default boolean isTransparentFocusItem()
        If this returns YES, the focus item is considered transparent in terms of occlusion. Items that are behind it are focusable. This value is ignored when the item is focusable, in which case the item is never considered transparent. API-Since: 15.0