WKInterfaceImage.SetImage 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
SetImage(NSData) |
Sets the image to the specified |
SetImage(String) |
Sets the image to the specified |
SetImage(UIImage) |
SetImage(NSData)
Sets the image to the specified imageData
or shows nothing if null
is passed.
[Foundation.Export("setImageData:")]
public virtual void SetImage (Foundation.NSData imageData);
abstract member SetImage : Foundation.NSData -> unit
override this.SetImage : Foundation.NSData -> unit
Parameters
- Attributes
Remarks
If the imageData
contains multiple images, the resulting image will be animated.
The size of the WKInterfaceImage is determined by the imageData
. If the result is larger than the screen, the image will be clipped.
Applies to
SetImage(String)
Sets the image to the specified imageName
file in the Watch bundle or device-side cache.
[Foundation.Export("setImageNamed:")]
public virtual void SetImage (string imageName);
abstract member SetImage : string -> unit
override this.SetImage : string -> unit
Parameters
- imageName
- String
A file in the Watch bundle or on the device-side cache.
This parameter can be null
.
- Attributes
Remarks
The Watch bundle is searched first for the corresponding file name (which should include the file extension). If the bundle does not contain the image, the device-side cache is then searched.
If the file contains multiple images, the resulting image will be animated.
The size of the WKInterfaceImage is determined by the file. If the result is larger than the screen, the image will be clipped.
Applies to
SetImage(UIImage)
[Foundation.Export("setImage:")]
public virtual void SetImage (UIKit.UIImage image);
abstract member SetImage : UIKit.UIImage -> unit
override this.SetImage : UIKit.UIImage -> unit
Parameters
- Attributes