Share via


IUIFocusEnvironment Interface

Definition

Interface defining the focus environment.

[Foundation.Protocol(Name="UIFocusEnvironment", WrapperType=typeof(UIKit.UIFocusEnvironmentWrapper))]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="SetNeedsFocusUpdate", Selector="setNeedsFocusUpdate")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="UpdateFocusIfNeeded", Selector="updateFocusIfNeeded")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="ShouldUpdateFocus", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext) }, ReturnType=typeof(System.Boolean), Selector="shouldUpdateFocusInContext:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="DidUpdateFocus", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext), typeof(UIKit.UIFocusAnimationCoordinator) }, Selector="didUpdateFocusInContext:withAnimationCoordinator:")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="preferredFocusedView", IsProperty=true, IsRequired=false, IsStatic=false, Name="PreferredFocusedView", PropertyType=typeof(UIKit.UIView), Selector="preferredFocusedView")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Copy, GetterSelector="preferredFocusEnvironments", IsProperty=true, IsRequired=true, IsStatic=false, Name="PreferredFocusEnvironments", PropertyType=typeof(UIKit.IUIFocusEnvironment[]), Selector="preferredFocusEnvironments")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="parentFocusEnvironment", IsProperty=true, IsRequired=true, IsStatic=false, Name="ParentFocusEnvironment", PropertyType=typeof(UIKit.IUIFocusEnvironment), Selector="parentFocusEnvironment")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.None, GetterSelector="focusItemContainer", IsProperty=true, IsRequired=true, IsStatic=false, Name="FocusItemContainer", PropertyType=typeof(UIKit.IUIFocusItemContainer), Selector="focusItemContainer")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.None, GetterSelector="focusGroupIdentifier", IsProperty=true, IsRequired=false, IsStatic=false, Name="FocusGroupIdentifier", PropertyType=typeof(System.String), Selector="focusGroupIdentifier")]
public interface IUIFocusEnvironment : IDisposable, ObjCRuntime.INativeObject
[Foundation.Protocol(Name="UIFocusEnvironment", WrapperType=typeof(UIKit.UIFocusEnvironmentWrapper))]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="SetNeedsFocusUpdate", Selector="setNeedsFocusUpdate")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="UpdateFocusIfNeeded", Selector="updateFocusIfNeeded")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="ShouldUpdateFocus", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext) }, ReturnType=typeof(System.Boolean), Selector="shouldUpdateFocusInContext:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="DidUpdateFocus", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext), typeof(UIKit.UIFocusAnimationCoordinator) }, Selector="didUpdateFocusInContext:withAnimationCoordinator:")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="preferredFocusedView", IsProperty=true, IsRequired=false, IsStatic=false, Name="PreferredFocusedView", PropertyType=typeof(UIKit.UIView), Selector="preferredFocusedView")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Copy, GetterSelector="preferredFocusEnvironments", IsProperty=true, IsRequired=true, IsStatic=false, Name="PreferredFocusEnvironments", PropertyType=typeof(UIKit.IUIFocusEnvironment[]), Selector="preferredFocusEnvironments")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="parentFocusEnvironment", IsProperty=true, IsRequired=true, IsStatic=false, Name="ParentFocusEnvironment", PropertyType=typeof(UIKit.IUIFocusEnvironment), Selector="parentFocusEnvironment")]
[Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.None, GetterSelector="focusItemContainer", IsProperty=true, IsRequired=true, IsStatic=false, Name="FocusItemContainer", PropertyType=typeof(UIKit.IUIFocusItemContainer), Selector="focusItemContainer")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="GetSoundIdentifier", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext) }, ReturnType=typeof(Foundation.NSString), Selector="soundIdentifierForFocusUpdateInContext:")]
public interface IUIFocusEnvironment : IDisposable, ObjCRuntime.INativeObject
[<Foundation.Protocol(Name="UIFocusEnvironment", WrapperType=typeof(UIKit.UIFocusEnvironmentWrapper))>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="SetNeedsFocusUpdate", Selector="setNeedsFocusUpdate")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="UpdateFocusIfNeeded", Selector="updateFocusIfNeeded")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="ShouldUpdateFocus", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext) }, ReturnType=typeof(System.Boolean), Selector="shouldUpdateFocusInContext:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="DidUpdateFocus", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext), typeof(UIKit.UIFocusAnimationCoordinator) }, Selector="didUpdateFocusInContext:withAnimationCoordinator:")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="preferredFocusedView", IsProperty=true, IsRequired=false, IsStatic=false, Name="PreferredFocusedView", PropertyType=typeof(UIKit.UIView), Selector="preferredFocusedView")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Copy, GetterSelector="preferredFocusEnvironments", IsProperty=true, IsRequired=true, IsStatic=false, Name="PreferredFocusEnvironments", PropertyType=typeof(UIKit.IUIFocusEnvironment[]), Selector="preferredFocusEnvironments")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="parentFocusEnvironment", IsProperty=true, IsRequired=true, IsStatic=false, Name="ParentFocusEnvironment", PropertyType=typeof(UIKit.IUIFocusEnvironment), Selector="parentFocusEnvironment")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.None, GetterSelector="focusItemContainer", IsProperty=true, IsRequired=true, IsStatic=false, Name="FocusItemContainer", PropertyType=typeof(UIKit.IUIFocusItemContainer), Selector="focusItemContainer")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.None, GetterSelector="focusGroupIdentifier", IsProperty=true, IsRequired=false, IsStatic=false, Name="FocusGroupIdentifier", PropertyType=typeof(System.String), Selector="focusGroupIdentifier")>]
type IUIFocusEnvironment = interface
    interface INativeObject
    interface IDisposable
[<Foundation.Protocol(Name="UIFocusEnvironment", WrapperType=typeof(UIKit.UIFocusEnvironmentWrapper))>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="SetNeedsFocusUpdate", Selector="setNeedsFocusUpdate")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="UpdateFocusIfNeeded", Selector="updateFocusIfNeeded")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="ShouldUpdateFocus", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext) }, ReturnType=typeof(System.Boolean), Selector="shouldUpdateFocusInContext:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="DidUpdateFocus", ParameterByRef=new System.Boolean[] { false, false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext), typeof(UIKit.UIFocusAnimationCoordinator) }, Selector="didUpdateFocusInContext:withAnimationCoordinator:")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="preferredFocusedView", IsProperty=true, IsRequired=false, IsStatic=false, Name="PreferredFocusedView", PropertyType=typeof(UIKit.UIView), Selector="preferredFocusedView")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Copy, GetterSelector="preferredFocusEnvironments", IsProperty=true, IsRequired=true, IsStatic=false, Name="PreferredFocusEnvironments", PropertyType=typeof(UIKit.IUIFocusEnvironment[]), Selector="preferredFocusEnvironments")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.Weak, GetterSelector="parentFocusEnvironment", IsProperty=true, IsRequired=true, IsStatic=false, Name="ParentFocusEnvironment", PropertyType=typeof(UIKit.IUIFocusEnvironment), Selector="parentFocusEnvironment")>]
[<Foundation.ProtocolMember(ArgumentSemantic=ObjCRuntime.ArgumentSemantic.None, GetterSelector="focusItemContainer", IsProperty=true, IsRequired=true, IsStatic=false, Name="FocusItemContainer", PropertyType=typeof(UIKit.IUIFocusItemContainer), Selector="focusItemContainer")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="GetSoundIdentifier", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(UIKit.UIFocusUpdateContext) }, ReturnType=typeof(Foundation.NSString), Selector="soundIdentifierForFocusUpdateInContext:")>]
type IUIFocusEnvironment = interface
    interface INativeObject
    interface IDisposable
Derived
Attributes
Implements

Properties

FocusGroupIdentifier
FocusItemContainer

Gets the container that manages focus information for child focus items.

Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from INativeObject)
ParentFocusEnvironment

Gets the parent focus environment.

PreferredFocusedView

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

PreferredFocusEnvironments

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

Methods

DidUpdateFocus(UIFocusUpdateContext, UIFocusAnimationCoordinator)

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

GetSoundIdentifier(UIFocusUpdateContext)
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

GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)
GetFocusGroupIdentifier(IUIFocusEnvironment)
GetPreferredFocusedView(IUIFocusEnvironment)

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

GetSoundIdentifier(IUIFocusEnvironment, UIFocusUpdateContext)

Applies to