UIButton.SetBackgroundImage(UIImage, UIControlState) UIButton.SetBackgroundImage(UIImage, UIControlState) Method

Definition

Sets the background image for the specified button state.

[Foundation.Export("setBackgroundImage:forState:")]
public virtual void SetBackgroundImage (UIKit.UIImage image, UIKit.UIControlState forState);
abstract member SetBackgroundImage : UIKit.UIImage * UIKit.UIControlState -> unit
override this.SetBackgroundImage : UIKit.UIImage * UIKit.UIControlState -> unit

Parameters

image
UIImage UIImage

The background image to set, use null to clear it.

This parameter can be null.

Remarks

This member participates in the UIAppearance styling system. See the Appearance property and the AppearanceWhenContainedIn(Type[]) method.

Applies to