IUIFocusEnvironment Interface

Definition

Interface defining the focus environment.

[Foundation.Protocol(Name="UIFocusEnvironment", WrapperType=typeof(UIKit.UIFocusEnvironmentWrapper))]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public interface IUIFocusEnvironment : IDisposable, ObjCRuntime.INativeObject
type IUIFocusEnvironment = interface
    interface INativeObject
    interface IDisposable
Derived
Attributes
Implements

Properties

Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from INativeObject)
PreferredFocusedView

If not null, indicates the child UIView that should receive focus by default.

Methods

DidUpdateFocus(UIFocusUpdateContext, UIFocusAnimationCoordinator)

Delegate method called shortly after focus has changed to a new UIView.

SetNeedsFocusUpdate()

When this is the active focus environment, requests a focus update, which can potentially change the PreferredFocusedView. (See also UpdateFocusIfNeeded().)

ShouldUpdateFocus(UIFocusUpdateContext)

Called prior to the current object either losing or receiving focus. If either focus environment returns false, the focus update is canceled.

UpdateFocusIfNeeded()

If any focus environment has a pending update, this method forces an immediate focus update. Unlike SetNeedsFocusUpdate(), this method may be called by any IUIFocusEnvironment, whether it currently contains focus or not.

Extension Methods

GetFocusItemContainer(IUIFocusEnvironment)

Gets the focus container for the environment.

GetParentFocusEnvironment(IUIFocusEnvironment)

Gets the parent focus environment.

GetPreferredFocusEnvironments(IUIFocusEnvironment)

Gets the list of focus environments, ordered by priority, that the environment prefers when updating the focus.

Applies to