<GCKUIImagePicker> プロトコル
GCKMediaMetadata オブジェクトから特定の目的の画像を選択するために使用されるオブジェクト。
デフォルトの実装はフレームワークで内部的に使用されます。フレームワークは、すべての用途について常にメタデータから最初の画像を選択します。アプリケーションは、GCKCastContext::imagePicker プロパティを設定することでカスタムの実装を提供できます。
- シンセ
- 3.0
<NSObject> を継承します。
指定したタイプの画像をメディア メタデータから返します。
- Parameters
-
imageHints | The hints about how to pick the image. |
metadata | The media metadata to pick from. |
- 戻り値
- 選択した画像。リクエストされたタイプに適切な画像がない場合は
nil
。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2022-12-06 UTC。
[null,null,["最終更新日 2022-12-06 UTC。"],[[["`GCKUIImagePicker` is a protocol used for selecting images from `GCKMediaMetadata` for display in the Google Cast user interface."],["A default implementation selects the first image from the metadata, but applications can provide a custom implementation for more nuanced image selection."],["The `getImageWithHints:fromMetadata:` method is the core functionality, allowing developers to retrieve an image based on specified criteria (hints) from the metadata."],["By setting the `GCKCastContext::imagePicker` property, developers can customize how images are selected for their Cast application's UI elements."]]],["The `GCKUIImagePicker` protocol is used to select an image from `GCKMediaMetadata`. By default, the framework selects the first image. Applications can implement custom selection logic by setting `GCKCastContext::imagePicker`. The core action is the `getImageWithHints:fromMetadata:` method, which takes `GCKUIImageHints` and `GCKMediaMetadata` as parameters to determine the image. The method returns the selected `GCKImage` or `nil` if no suitable image is found.\n"]]