کلاس GCKImage
با مجموعهها، منظم بمانید
ذخیره و دستهبندی محتوا براساس اولویتهای شما.
کلاسی که تصویری را نشان می دهد که در یک وب سرور قرار دارد.
برای مواردی مانند نمادهای GCKDevice و آثار هنری GCKMediaMetadata استفاده می شود.
NSObject، <NSCopying> و <NSSecureCoding> را به ارث می برد.
- (instancetype) initWithURL: |
|
(NSURL *) |
URL |
width: |
|
(NSInteger) |
width |
height: |
|
(NSInteger) |
height |
|
|
| |
یک GCKImage جدید با URL و ابعاد داده شده می سازد.
مقداردهی اولیه تعیین شده
- Parameters
-
URL | The URL of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
- استثناها
NSInvalidArgumentException | اگر URL nil یا خالی باشد یا ابعاد نامعتبر باشد. |
مقداردهی اولیه پیش فرض در دسترس نیست.
ارتفاع تصویر بر حسب پیکسل
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-10 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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"]],["تاریخ آخرین بهروزرسانی 2025-01-10 بهوقت ساعت هماهنگ جهانی."],[[["The `GCKImage` class represents an image located on a web server, used for elements like device icons and media metadata artwork."],["It provides methods for initialization with a URL and dimensions, specifying the image's location and size."],["Key properties include `URL`, `width`, and `height`, offering access to the image's web address and pixel dimensions."],["The default initializer is unavailable; you must use the designated initializer with URL and dimensions."]]],["The GCKImage class represents a web-hosted image, used for elements like device icons and media artwork. Key actions include initializing a GCKImage object with `initWithURL:width:height:`, providing the image's URL, width, and height in pixels. The default initializer `init` is unavailable. Properties include `URL` for the image's location, `width` for pixel width, and `height` for pixel height. Initialization with an invalid URL or dimensions will throw an exception.\n"]]