<GCKUIImageCache> Protocol
Stay organized with collections
Save and categorize content based on your preferences.
A protocol that defines a means of retrieving and caching images.
A default implementation is used internally by the framework to cache media artwork that is displayed in the user interface. The application can provide a custom implementation by setting the GCKCastContext::imageCache property.
- Since
- 3.0
Inherits <NSObject>.
- (void) fetchImageForURL: |
|
(NSURL *) |
imageURL |
completion: |
|
(void(^)(UIImage *__nullable)) |
completion |
|
|
| |
Fetches the image at the given URL, and returns a scaled version of the image.
This is an asynchronous operation.
- Parameters
-
imageURL | The URL of the image. |
completion | A block to invoke once the image has been retrieved. The image should be passed to the block. If there was an error retrieving the image, nil should be passed instead. The block should only be invoked on the main thread. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `GCKUIImageCache` protocol defines how images are retrieved and cached within the Google Cast framework."],["Developers can provide a custom implementation to manage image caching for media artwork displayed in the UI."],["The `fetchImageForURL:completion:` method asynchronously retrieves and scales images, notifying via a completion block on the main thread."]]],[]]