Edit

Share via


UISwitch.SetState(Boolean, Boolean) Method

Definition

This method changes the state of the switch, and will animate the change if specified.

[Foundation.Export("setOn:animated:")]
public virtual void SetState (bool newState, bool animated);
abstract member SetState : bool * bool -> unit
override this.SetState : bool * bool -> unit

Parameters

newState
Boolean

The new value of the switch.

animated
Boolean

If the change in state should be animated.

Attributes

Applies to