Classe GCKUIMultistateButton
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Una sottoclasse di UIButton che supporta più stati.
Assegna un'immagine a ogni stato con il metodo setImage:forButtonState: (GCKUIMultistateButton).
- Dal
- 4,0
Eredita UIButton.
Ereditato da GCKUIButton.
- (void) setImage: |
|
(UIImage *) |
image |
forButtonState: |
|
(NSUInteger) |
buttonState |
|
|
| |
Imposta l'immagine da visualizzare per un determinato stato del pulsante.
- Parameters
-
image | The image. |
buttonState | The button state. |
- (NSUInteger) buttonState |
|
readwritenonatomicassign |
Lo stato dell'applicazione del pulsante.
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 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eGCKUIMultistateButton\u003c/code\u003e is a subclass of \u003ccode\u003eUIButton\u003c/code\u003e that supports multiple states, allowing you to assign different images for each state.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the image for a specific button state using the \u003ccode\u003esetImage:forButtonState:\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuttonState\u003c/code\u003e property indicates the current application state of the button.\u003c/p\u003e\n"],["\u003cp\u003eThis class is available since version 4.0 of the framework and is inherited by \u003ccode\u003eGCKUIButton\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GCKUIMultistateButton Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKUIMultistateButton Class Reference \n\nOverview\n--------\n\nA subclass of [**UIButton**](https://goo.gl/VK61wU) that supports multiple states.\n\nAssign an image to each state with the [setImage:forButtonState: (GCKUIMultistateButton)](/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button#afa6a9b60ccbe99ae3dd6fdd1f92225e3 \"Sets the image to display for a given button state. \") method.\n\nSince\n: 4.0\n\nInherits UIButton.\n\nInherited by [GCKUIButton](/cast/docs/reference/ios/interface_g_c_k_u_i_button).\n\n|--------|--------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (void) | - [setImage:forButtonState:](/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button#afa6a9b60ccbe99ae3dd6fdd1f92225e3) |\n| | Sets the image to display for a given button state. [More...](#afa6a9b60ccbe99ae3dd6fdd1f92225e3) |\n| ||\n\n|------------|-----------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| NSUInteger | [buttonState](/cast/docs/reference/ios/interface_g_c_k_u_i_multistate_button#a51dc394e64d3837d6bffcad409f3f0f4) |\n| | The button's application state. [More...](#a51dc394e64d3837d6bffcad409f3f0f4) |\n| ||\n\nMethod Detail\n-------------\n\n|--------------------|---|--------------|---------------|\n| - (void) setImage: | | (UIImage \\*) | *image* |\n| forButtonState: | | (NSUInteger) | *buttonState* |\n| | | | |\n\nSets the image to display for a given button state.\n\nParameters\n:\n\n |-------------|-------------------|\n | image | The image. |\n | buttonState | The button state. |\n\n\nProperty Detail\n---------------\n\n|---------------------------------------------------------------|--------------------------|\n| |----------------------------| | - (NSUInteger) buttonState | | readwritenonatomicassign |\n\nThe button's application state."]]