GCKUIMultistateButton Class
Stay organized with collections
Save and categorize content based on your preferences.
A subclass of UIButton that supports multiple states.
Assign an image to each state with the setImage:forButtonState: (GCKUIMultistateButton) method.
- Since
- 4.0
Inherits UIButton.
Inherited by GCKUIButton.
- (void) setImage: |
|
(UIImage *) |
image |
forButtonState: |
|
(NSUInteger) |
buttonState |
|
|
| |
Sets the image to display for a given button state.
- Parameters
-
image | The image. |
buttonState | The button state. |
- (NSUInteger) buttonState |
|
readwritenonatomicassign |
The button's application state.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 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,["[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKUIMultistateButton Class Reference \n\nOverview \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| - (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| |----------------------------| | - (NSUInteger) buttonState | | readwritenonatomicassign |\n\nThe button's application state."]]