WKInterfaceDevice.AddCachedImage Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| AddCachedImage(NSData, String) |
Ajoute une image définie dans au |
| AddCachedImage(UIImage, String) |
AddCachedImage(NSData, String)
Ajoute une image définie dans au imageData cache d’images de l’appareil.
[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
Paramètres
- name
- String
Identificateur. Si la valeur se trouve déjà dans le cache d’image, l’image existante est remplacée.
Retours
true si l’image a été correctement ajoutée au cache d’image.
- Attributs
Remarques
Les développeurs qui souhaitent stocker des animations doivent créer l’intégralité de l’animation en un seul UIImage (voir CreateAnimatedImage(String, UIEdgeInsets, UIImageResizingMode, Double) surcharges), puis sérialiser le résultat UIImage à NSData pour l’argument imageData .
S’applique à
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
Paramètres
- image
- UIImage
- name
- String
Retours
- Attributs