<GCKUIImageCache> প্রোটোকল
একটি প্রোটোকল যা চিত্র পুনরুদ্ধার এবং ক্যাশে করার একটি উপায় নির্ধারণ করে।
একটি ডিফল্ট বাস্তবায়ন ফ্রেমওয়ার্ক দ্বারা অভ্যন্তরীণভাবে ব্যবহৃত হয় মিডিয়া আর্টওয়ার্ক ক্যাশে যা ব্যবহারকারী ইন্টারফেসে প্রদর্শিত হয়। অ্যাপ্লিকেশনটি GCKCastContext::imageCache বৈশিষ্ট্য সেট করে একটি কাস্টম বাস্তবায়ন প্রদান করতে পারে।
- থেকে
- 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. |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2024-10-30 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2024-10-30 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["The `GCKUIImageCache` protocol defines how images are retrieved and cached for display within the Google Cast framework."],["Developers can customize image caching by providing their own implementation and setting it on the `GCKCastContext`."],["The `fetchImageForURL:completion:` method retrieves and scales images asynchronously, notifying the caller via a completion block on the main thread."]]],["The `GCKUIImageCache` protocol defines image retrieval and caching. It utilizes a default implementation for media artwork displayed in the user interface, but applications can provide custom implementations via `GCKCastContext::imageCache`. The core functionality is provided by the `fetchImageForURL:completion:` method, which asynchronously fetches an image from a given URL. It then returns a scaled version of the image to the main thread through a completion block, or `nil` if an error occurs.\n"]]