UIViewController.RegisterForTraitChanges Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RegisterForTraitChanges(IUITraitDefinition[], NSObject, Selector)
Caution
Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], NSObject, Selector)' method instead.
[System.Obsolete("Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], NSObject, Selector)' method instead.", false)]
public virtual UIKit.IUITraitChangeRegistration RegisterForTraitChanges(UIKit.IUITraitDefinition[] traits, Foundation.NSObject target, ObjCRuntime.Selector action);
[<System.Obsolete("Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], NSObject, Selector)' method instead.", false)>]
abstract member RegisterForTraitChanges : UIKit.IUITraitDefinition[] * Foundation.NSObject * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : UIKit.IUITraitDefinition[] * Foundation.NSObject * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- IUITraitDefinition[]
- target
- NSObject
- action
- Selector
Returns
Implements
- Attributes
Applies to
RegisterForTraitChanges(Type[], NSObject, Selector)
Registers a selector that will be called on the specified object when any of the specified traits changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges(Type[] traits, Foundation.NSObject target, ObjCRuntime.Selector action);
abstract member RegisterForTraitChanges : Type[] * Foundation.NSObject * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : Type[] * Foundation.NSObject * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- Type[]
The traits to observe.
- target
- NSObject
The object whose specified selector will be called.
- action
- Selector
The selector to call on the specified object.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).
Implements
Applies to
RegisterForTraitChanges(Class[], NSObject, Selector)
[Foundation.Export("registerForTraitChanges:withTarget:action:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual UIKit.IUITraitChangeRegistration RegisterForTraitChanges(ObjCRuntime.Class[] traits, Foundation.NSObject target, ObjCRuntime.Selector action);
[<Foundation.Export("registerForTraitChanges:withTarget:action:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member RegisterForTraitChanges : ObjCRuntime.Class[] * Foundation.NSObject * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : ObjCRuntime.Class[] * Foundation.NSObject * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- Class[]
- target
- NSObject
- action
- Selector
Returns
Implements
- Attributes
Applies to
RegisterForTraitChanges(IUITraitDefinition[], Action<IUITraitEnvironment,UITraitCollection>)
Caution
Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], Action<IUITraitEnvironment, UITraitCollection>)' method instead.
[System.Obsolete("Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], Action<IUITraitEnvironment, UITraitCollection>)' method instead.", false)]
public virtual UIKit.IUITraitChangeRegistration RegisterForTraitChanges(UIKit.IUITraitDefinition[] traits, Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler);
[<System.Obsolete("Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], Action<IUITraitEnvironment, UITraitCollection>)' method instead.", false)>]
abstract member RegisterForTraitChanges : UIKit.IUITraitDefinition[] * Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : UIKit.IUITraitDefinition[] * Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- IUITraitDefinition[]
- handler
- Action<IUITraitEnvironment,UITraitCollection>
Returns
Implements
- Attributes
Applies to
RegisterForTraitChanges(IUITraitDefinition[], Selector)
Caution
Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], Selector)' method instead.
[System.Obsolete("Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], Selector)' method instead.", false)]
public virtual UIKit.IUITraitChangeRegistration RegisterForTraitChanges(UIKit.IUITraitDefinition[] traits, ObjCRuntime.Selector action);
[<System.Obsolete("Use the 'UITraitChangeObservable.RegisterForTraitChanges (Class[], Selector)' method instead.", false)>]
abstract member RegisterForTraitChanges : UIKit.IUITraitDefinition[] * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : UIKit.IUITraitDefinition[] * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- IUITraitDefinition[]
- action
- Selector
Returns
Implements
- Attributes
Applies to
RegisterForTraitChanges(Action<IUITraitEnvironment,UITraitCollection>, Type[])
Registers a callback handler that will be executed when one of the specified traits changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges(Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler, params Type[] traits);
abstract member RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> * Type[] -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> * Type[] -> UIKit.IUITraitChangeRegistration
Parameters
- handler
- Action<IUITraitEnvironment,UITraitCollection>
The callback to execute when any of the specified traits changes.
- traits
- Type[]
The traits to observe.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).
Implements
Applies to
RegisterForTraitChanges(Type[], Selector)
Registers a selector that will be called on the current object when any of the specified traits changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges(Type[] traits, ObjCRuntime.Selector action);
abstract member RegisterForTraitChanges : Type[] * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : Type[] * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- Type[]
The traits to observe.
- action
- Selector
The selector to call on the current object.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).
Implements
Applies to
RegisterForTraitChanges(Class[], Action<IUITraitEnvironment,UITraitCollection>)
[Foundation.Export("registerForTraitChanges:withHandler:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual UIKit.IUITraitChangeRegistration RegisterForTraitChanges(ObjCRuntime.Class[] traits, Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler);
[<Foundation.Export("registerForTraitChanges:withHandler:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member RegisterForTraitChanges : ObjCRuntime.Class[] * Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : ObjCRuntime.Class[] * Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- Class[]
- handler
- Action<IUITraitEnvironment,UITraitCollection>
Returns
Implements
- Attributes
Applies to
RegisterForTraitChanges(Class[], Selector)
[Foundation.Export("registerForTraitChanges:withAction:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual UIKit.IUITraitChangeRegistration RegisterForTraitChanges(ObjCRuntime.Class[] traits, ObjCRuntime.Selector action);
[<Foundation.Export("registerForTraitChanges:withAction:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member RegisterForTraitChanges : ObjCRuntime.Class[] * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : ObjCRuntime.Class[] * ObjCRuntime.Selector -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- Class[]
- action
- Selector
Returns
Implements
- Attributes
Applies to
RegisterForTraitChanges(Type[], Action<IUITraitEnvironment,UITraitCollection>)
Registers a callback handler that will be executed when one of the specified traits changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges(Type[] traits, Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler);
abstract member RegisterForTraitChanges : Type[] * Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration
override this.RegisterForTraitChanges : Type[] * Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration
Parameters
- traits
- Type[]
The traits to observe.
- handler
- Action<IUITraitEnvironment,UITraitCollection>
The callback to execute when any of the specified traits changes.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).
Implements
Applies to
RegisterForTraitChanges<T>(Action<IUITraitEnvironment,UITraitCollection>)
Registers a callback handler that will be executed when the specified trait changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges<T>(Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler) where T : UIKit.IUITraitDefinition;
abstract member RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T :> UIKit.IUITraitDefinition)
override this.RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T :> UIKit.IUITraitDefinition)
Type Parameters
- T
The trait to observe.
Parameters
- handler
- Action<IUITraitEnvironment,UITraitCollection>
The callback to execute when any of the specified traits changes.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).
Implements
Applies to
RegisterForTraitChanges<T1,T2,T3,T4>(Action<IUITraitEnvironment,UITraitCollection>)
Registers a callback handler that will be executed when any of the specified traits changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges<T1,T2,T3,T4>(Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler) where T1 : UIKit.IUITraitDefinition where T2 : UIKit.IUITraitDefinition where T3 : UIKit.IUITraitDefinition where T4 : UIKit.IUITraitDefinition;
abstract member RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T1 :> UIKit.IUITraitDefinition and 'T2 :> UIKit.IUITraitDefinition and 'T3 :> UIKit.IUITraitDefinition and 'T4 :> UIKit.IUITraitDefinition)
override this.RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T1 :> UIKit.IUITraitDefinition and 'T2 :> UIKit.IUITraitDefinition and 'T3 :> UIKit.IUITraitDefinition and 'T4 :> UIKit.IUITraitDefinition)
Type Parameters
- T1
A trait to observe
- T2
A trait to observe
- T3
A trait to observe
- T4
A trait to observe
Parameters
- handler
- Action<IUITraitEnvironment,UITraitCollection>
The callback to execute when any of the specified traits changes.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).
Implements
Applies to
RegisterForTraitChanges<T1,T2,T3>(Action<IUITraitEnvironment,UITraitCollection>)
Registers a callback handler that will be executed when any of the specified traits changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges<T1,T2,T3>(Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler) where T1 : UIKit.IUITraitDefinition where T2 : UIKit.IUITraitDefinition where T3 : UIKit.IUITraitDefinition;
abstract member RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T1 :> UIKit.IUITraitDefinition and 'T2 :> UIKit.IUITraitDefinition and 'T3 :> UIKit.IUITraitDefinition)
override this.RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T1 :> UIKit.IUITraitDefinition and 'T2 :> UIKit.IUITraitDefinition and 'T3 :> UIKit.IUITraitDefinition)
Type Parameters
- T1
A trait to observe
- T2
A trait to observe
- T3
A trait to observe
Parameters
- handler
- Action<IUITraitEnvironment,UITraitCollection>
The callback to execute when any of the specified traits changes.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).
Implements
Applies to
RegisterForTraitChanges<T1,T2>(Action<IUITraitEnvironment,UITraitCollection>)
Registers a callback handler that will be executed when any of the specified traits changes.
public UIKit.IUITraitChangeRegistration RegisterForTraitChanges<T1,T2>(Action<UIKit.IUITraitEnvironment,UIKit.UITraitCollection> handler) where T1 : UIKit.IUITraitDefinition where T2 : UIKit.IUITraitDefinition;
abstract member RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T1 :> UIKit.IUITraitDefinition and 'T2 :> UIKit.IUITraitDefinition)
override this.RegisterForTraitChanges : Action<UIKit.IUITraitEnvironment, UIKit.UITraitCollection> -> UIKit.IUITraitChangeRegistration (requires 'T1 :> UIKit.IUITraitDefinition and 'T2 :> UIKit.IUITraitDefinition)
Type Parameters
- T1
A trait to observe
- T2
A trait to observe
Parameters
- handler
- Action<IUITraitEnvironment,UITraitCollection>
The callback to execute when any of the specified traits changes.
Returns
A token that can be used to unregister the callback by calling UnregisterForTraitChanges(IUITraitChangeRegistration).