Instance Method

addCachedImage(_:name:)

Caches the image using the provided name.

Declaration

func addCachedImage(_ image: UIImage, name: String) -> Bool

Discussion

Each cached image must have a unique name. Adding an image with the same name as an existing image replaces the existing image with the new image.

See Also

watchOS 1 Properties and Methods

var cachedImages: [String : NSNumber]

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

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.