Edit

Share via


UIButton.SetTitle(String, UIControlState) Method

Definition

Sets the title for the specified button state.

[Foundation.Export("setTitle:forState:")]
public virtual void SetTitle (string title, UIKit.UIControlState forState);
abstract member SetTitle : string * UIKit.UIControlState -> unit
override this.SetTitle : string * UIKit.UIControlState -> unit

Parameters

title
String

The title to set, pass null to clear it.

This parameter can be null.

forState
UIControlState
Attributes

Applies to