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):2025-07-25。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-25。"],[],["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"]]