<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 และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-01 UTC
[null,null,["อัปเดตล่าสุด 2023-12-01 UTC"],[[["`GCKUIImagePicker` protocol helps select images from `GCKMediaMetadata` objects for display within the Google Cast framework."],["By default, the first image in the metadata is used, but apps can customize image selection via `GCKCastContext::imagePicker`."],["`getImageWithHints:fromMetadata:` method fetches a specific image type from the metadata based on provided hints."],["If no suitable image is found matching the desired type, this method will return `nil`."]]],["The `GCKUIImagePicker` protocol selects an image from `GCKMediaMetadata`. It has a default implementation that selects the first image. Custom implementations can be provided via `GCKCastContext::imagePicker`. The key method, `getImageWithHints:fromMetadata:`, retrieves an image based on `GCKUIImageHints` from provided metadata. It returns the selected `GCKImage` or `nil` if no suitable image is found. This enables picking specific image types for different purposes.\n"]]