Klasa GCKUIButton
Podklasa klasy UIButton, która obsługuje niestandardowe stany aplikacji.
Te stany są połączone operatorem LUB na wartości właściwości state przycisku, co pozwala uzyskać dodatkowe stany specyficzne dla aplikacji. Obrazy można przypisać do tych stanów niestandardowych, na przykład:
[button setImage:[UIImage imageNamed:@"myCustomStateImage"]
forState:(UIControlStateNormal | kMyControlStateCustom)];
Wartości stanu aplikacji mogą korzystać tylko z bitów ustawionych w masce bitowej UIControlStateApplication.
- Deprecated:
- Użyj aplikacji GCKUIMultistateButton.
- Od
- 3,0
Dziedziczy właściwość GCKUIMultistateButton.
- (void) setImage: |
|
(UIImage *) |
image |
forButtonState: |
|
(NSUInteger) |
buttonState |
|
|
| |
Ustawia obraz, który ma być wyświetlany w przypadku danego stanu przycisku.
- Parameters
-
image | The image. |
buttonState | The button state. |
- (UIControlState) applicationState |
|
readwritenonatomicassign |
Stan aplikacji przycisku.
Stan przycisku zostanie dodany do aktualnego stanu przycisku za pomocą operatora LUB.
- (NSUInteger) buttonState |
|
readwritenonatomicassigninherited |
Stan aplikacji przycisku.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2023-12-02 UTC.
[null,null,["Ostatnia aktualizacja: 2023-12-02 UTC."],[[["GCKUIButton is a subclass of UIButton that supports custom application states, allowing developers to assign images to these states for enhanced UI customization."],["This class is deprecated since version 3.0 and developers should use GCKUIMultistateButton instead."],["Application state values should only use bits defined in the UIControlStateApplication bitmask to ensure compatibility and avoid conflicts."],["`setImage:forButtonState:` method allows setting images for specific button states, providing visual feedback to users."],["The `applicationState` property represents the button's current application state, which is ORed with the existing state to combine multiple states."]]],["The GCKUIButton class, a subclass of UIButton, supports custom application states via the `state` property. Custom states are combined with the button's existing state. Images can be assigned to these custom states using `setImage:forButtonState:`. The `applicationState` property is ORed onto the button's state. The `buttonState` represents the button's state. Application states should use only bits within the `UIControlStateApplication` bitmask. The GCKUIButton is deprecated, and developers should use GCKUIMultistateButton instead.\n"]]