GCKImage 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
表示位于网络服务器上的图片的类。
用于 GCKDevice 图标和 GCKMediaMetadata 海报图片等。
继承 NSObject、<NSCopy> 和 <NSSecureCoding>。
- (instancetype) initWithURL: |
|
(NSURL *) |
URL |
width: |
|
(NSInteger) |
width |
height: |
|
(NSInteger) |
height |
|
|
| |
使用给定的网址和尺寸构造新的 GCKImage。
指定的初始化程序。
- Parameters
-
URL | The URL of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
- 异常
-
NSInvalidArgumentException | 如果网址为 nil 或为空,或者尺寸无效,则会发生该错误。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-02。
[[["易于理解","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"]],["最后更新时间 (UTC):2023-12-02。"],[[["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."]]],[]]