פרוטוקול <GCKUIImageSelecter>
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אובייקט המשמש לבחירת תמונה למטרה מסוימת מאובייקט GCKMediaMetadata.
הטמעת ברירת מחדל משמשת באופן פנימי את המסגרת, שתמיד בוחרת את התמונה הראשונה מהמטא-נתונים לכל השימושים. האפליקציה יכולה לספק הטמעה מותאמת אישית על ידי הגדרת המאפיין GCKCastContext::imagePicker.
- סינסה
- 3.0
עוברת בירושה <NSObject>.
מחזירה תמונה מהסוג שצוין מהמטא-נתונים של המדיה.
- Parameters
-
imageHints | The hints about how to pick the image. |
metadata | The media metadata to pick from. |
- החזרות
- התמונה שנבחרה, או
nil
, אם אין תמונה מתאימה לסוג המבוקש.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2022-12-06 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 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"]]