โปรโตคอล <GCKUIImageCache>
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
โปรโตคอลที่กําหนดวิธีการเรียกข้อมูลและการแคชรูปภาพ
เฟรมเวิร์กนี้ใช้การติดตั้งใช้งานเริ่มต้นภายในเพื่อแคชอาร์ตเวิร์กสื่อที่แสดงในอินเทอร์เฟซผู้ใช้ แอปพลิเคชันสามารถติดตั้งใช้งานด้วยตนเองได้โดยตั้งค่าพร็อพเพอร์ตี้ GCKCastContext::imageCache
- Since
- 3.0
รับค่า <NSObject>
- (void) fetchImageForURL: |
|
(NSURL *) |
imageURL |
completion: |
|
(void(^)(UIImage *__nullable)) |
completion |
|
|
| |
ดึงข้อมูลรูปภาพที่ URL ที่ระบุและแสดงรูปภาพในเวอร์ชันที่ปรับขนาด
การดําเนินการนี้เป็นการดําเนินการแบบไม่พร้อมกัน
- Parameters
-
imageURL | The URL of the image. |
completion | A 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. |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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"],[[["The `GCKUIImageCache` protocol defines how images are retrieved and cached within the Google Cast framework."],["Developers can provide a custom implementation to manage image caching for media artwork displayed in the UI."],["The `fetchImageForURL:completion:` method asynchronously retrieves and scales images, notifying via a completion block on the main thread."]]],[]]