WKInterfaceButton.SetBackgroundImage Method

Definition

Overloads

SetBackgroundImage(NSData)

Sets the background image for the button.

SetBackgroundImage(String)

Sets the background image for the button.

SetBackgroundImage(UIImage)

SetBackgroundImage(NSData)

Sets the background image for the button.

[Foundation.Export("setBackgroundImageData:")]
public virtual void SetBackgroundImage (Foundation.NSData imageData);
abstract member SetBackgroundImage : Foundation.NSData -> unit
override this.SetBackgroundImage : Foundation.NSData -> unit

Parameters

imageData
NSData

The raw data for the image. If null, the background image is cleared.

This parameter can be null.

Attributes

Remarks

If the imageData contains multiple images, the background image will be animated.

Applies to

SetBackgroundImage(String)

Sets the background image for the button.

[Foundation.Export("setBackgroundImageNamed:")]
public virtual void SetBackgroundImage (string imageName);
abstract member SetBackgroundImage : string -> unit
override this.SetBackgroundImage : string -> unit

Parameters

imageName
String

The name of the image file to be used as a background image. If null, the background image is cleared.

This parameter can be null.

Attributes

Remarks

If the imageName file contains multiple images, the background image will be animated.

Applies to

SetBackgroundImage(UIImage)

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

Parameters

image
UIImage

To be added.

This parameter can be null.

Attributes

Applies to