Classe GCKImage
Una classe che rappresenta un'immagine situata su un server web.
Utilizzata per elementi quali icone GCKDevice e artwork GCKMediaMetadata.
Eredita NSObject, <NSCOPY> e <NSSecureCoding>.
- (instancetype) initWithURL: |
|
(NSURL *) |
URL |
width: |
|
(NSInteger) |
width |
height: |
|
(NSInteger) |
height |
|
|
| |
Consente di creare un nuovo GCKImage con l'URL e le dimensioni specificati.
Inizializzatore designato.
- Parameters
-
URL | The URL of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
- Eccezioni
-
NSInvalidArgumentException | se l'URL è nil o vuoto, oppure le dimensioni non sono valide. |
Inizializzatore predefinito non disponibile.
La larghezza dell'immagine, in pixel.
L'altezza dell'immagine in pixel.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2023-12-02 UTC.
[null,null,["Ultimo aggiornamento 2023-12-02 UTC."],[[["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"]]