Instance Property

cachedImages

A dictionary containing the name and size (in bytes) of the cached images.

Declaration

var cachedImages: [String : NSNumber] { get }

Discussion

In watchOS 1 apps, use this property to move images from the WatchKit extension on iPhone to the Watch app on Apple Watch. Using the cachedImages dictionary, you can transmit the image once, and then access it by name multiple times.

See Also

watchOS 1 Properties and Methods

func addCachedImage(UIImage, name: String)

Caches the image using the provided name.

func addCachedImage(with: Data, name: String)

Caches the image data using the provided name.

func removeAllCachedImages()

Removes all the cached images from the cachedImages dictionary.

func removeCachedImage(withName: String)

Removes the cached image with the specified name.