<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.