public interface UIFocusEnvironment
| Modifier and Type | Method and Description |
|---|---|
void |
didUpdateFocusInContextWithAnimationCoordinator(UIFocusUpdateContext context,
UIFocusAnimationCoordinator coordinator)
Called when the screen’s focused item has been updated to a new item.
|
default java.lang.String |
focusGroupIdentifier()
The identifier of the focus group that this view belongs to.
|
UIFocusItemContainer |
focusItemContainer()
The container of any child focus items in this focus environment, or nil if no container exists.
|
UIFocusEnvironment |
parentFocusEnvironment()
The parent focus environment of this environment, or nil if no parent exists.
|
default UIView |
preferredFocusedView() |
NSArray<?> |
preferredFocusEnvironments()
The preferred focus environments define where to search for the default focused item in an environment, such as when focus updates programmatically.
|
void |
setNeedsFocusUpdate()
Marks this environment as needing a focus update, which if accepted will attempt to reset focus to this environment, or one of its preferred focus environments, on the next update cycle.
|
boolean |
shouldUpdateFocusInContext(UIFocusUpdateContext context)
Asks whether the system should allow a focus update to occur.
|
void |
updateFocusIfNeeded()
Forces focus to be updated immediately.
|
void didUpdateFocusInContextWithAnimationCoordinator(UIFocusUpdateContext context, UIFocusAnimationCoordinator coordinator)
NSArray<?> preferredFocusEnvironments()
default UIView preferredFocusedView()
void setNeedsFocusUpdate()
boolean shouldUpdateFocusInContext(UIFocusUpdateContext context)
void updateFocusIfNeeded()
UIFocusItemContainer focusItemContainer()
UIFocusEnvironment parentFocusEnvironment()
default java.lang.String focusGroupIdentifier()