WKInterfaceDevice.AddCachedImage 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
AddCachedImage(NSData, String) |
Adds an image defined in the |
AddCachedImage(UIImage, String) |
AddCachedImage(NSData, String)
Adds an image defined in the imageData
to the device's image cache.
[Foundation.Export("addCachedImageWithData:name:")]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool AddCachedImage (Foundation.NSData imageData, string name);
abstract member AddCachedImage : Foundation.NSData * string -> bool
override this.AddCachedImage : Foundation.NSData * string -> bool
Parameters
- name
- String
An identifier. If the value is already in the image cache, the existing image will be replaced.
Returns
true
if the image was successfully added to the image cache.
- Attributes
Remarks
Developers that wish to store animations should create the entire animation in a single UIImage (see CreateAnimatedImage(String, UIEdgeInsets, UIImageResizingMode, Double) overloads) and then serialize the resulting UIImage to NSData for the imageData
argument.
Applies to
AddCachedImage(UIImage, String)
[Foundation.Export("addCachedImage:name:")]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool AddCachedImage (UIKit.UIImage image, string name);
abstract member AddCachedImage : UIKit.UIImage * string -> bool
override this.AddCachedImage : UIKit.UIImage * string -> bool
Parameters
- image
- UIImage
- name
- String
Returns
- Attributes