โปรโตคอล <GCKUIImage Picker>
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ออบเจ็กต์ที่ใช้ในการเลือกรูปภาพสําหรับวัตถุประสงค์ที่ต้องการจากออบเจ็กต์ GCKMediaMetadata
เฟรมเวิร์กเริ่มต้นจะใช้ภายในภายใน ซึ่งจะเลือกรูปภาพแรกจากข้อมูลเมตาทั้งหมดเสมอสําหรับการใช้งานทั้งหมด แอปพลิเคชันสามารถติดตั้งใช้งานด้วยตนเองได้โดยตั้งค่าพร็อพเพอร์ตี้ GCKCastContext::imagePicker
- Since
- 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
[[["เข้าใจง่าย","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"]]