GCKImage Class

  • 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.

GCKImage Class Reference

Overview

A class that represents an image that is located on a web server.

Used for such things as GCKDevice icons and GCKMediaMetadata artwork.

Inherits NSObject, <NSCopying>, and <NSSecureCoding>.

Instance Method Summary

(instancetype) - initWithURL:width:height:
 Constructs a new GCKImage with the given URL and dimensions. More...
 
(instancetype) - init
 Default initializer is not available. More...
 

Property Summary

NSURL * URL
 The image URL. More...
 
NSInteger width
 The image width, in pixels. More...
 
NSInteger height
 The image height, in pixels. More...
 

Method Detail

- (instancetype) initWithURL: (NSURL *)  URL
width: (NSInteger)  width
height: (NSInteger)  height 

Constructs a new GCKImage with the given URL and dimensions.

Designated initializer.

Parameters
URLThe URL of the image.
widthThe width of the image, in pixels.
heightThe height of the image, in pixels.
Exceptions
NSInvalidArgumentExceptionif the URL is nil or empty, or the dimensions are invalid.
- (instancetype) init

Default initializer is not available.

Property Detail

- (NSURL*) URL
readnonatomicstrong

The image URL.

- (NSInteger) width
readnonatomicassign

The image width, in pixels.

- (NSInteger) height
readnonatomicassign

The image height, in pixels.