<GCKUIImageCache> 协议

<GCKUIImageCache> 协议参考

概览

定义检索和缓存图像的协议。

框架在内部使用默认实现来缓存显示在界面中的媒体图片。应用可以通过设置 GCKCastContext::imageCache 属性来提供自定义实现。

辛塞
3.0

此类继承 <NSObject>。

实例方法摘要

(void) - fetchImageForURL:completion:
 通过指定的网址提取图片,并返回图片的缩放版本。更多...
 

方法详细信息

- (void) fetchImageForURL: (NSURL *)  imageURL
completion: (void(^)(UIImage *__nullable))  completion 

通过指定的网址提取图片,并返回图片的缩放版本。

这是一项异步操作。

Parameters
imageURLThe URL of the image.
completionA 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.