GCKUIButton-Klasse
Eine Unterklasse von UIButton, die benutzerdefinierte Anwendungsstatus unterstützt.
Diese Zustände sind mit dem Wert der state-Eigenschaft der Schaltfläche verknüpft, um zusätzliche anwendungsspezifische Zustände bereitzustellen. Diesen benutzerdefinierten Status können Bilder zugewiesen werden, z. B.:
[button setImage:[UIImage imageNamed:@"myCustomStateImage"]
forState:(UIControlStateNormal | kMyControlStateCustom)];
Anwendungsstatuswerte dürfen nur die Bits verwenden, die in der Bitmaske UIControlStateApplication festgelegt sind.
- Deprecated:
- Verwenden Sie GCKUIMultistateButton.
- Seit
- 3,0
Übernimmt GCKUIMultistateButton.
- (void) setImage: |
|
(UIImage *) |
image |
forButtonState: |
|
(NSUInteger) |
buttonState |
|
|
| |
Legt das Bild fest, das für einen bestimmten Schaltflächenstatus angezeigt werden soll.
- Parameters
-
image | The image. |
buttonState | The button state. |
- (UIControlState) applicationState |
|
readwritenonatomicassign |
Der Anwendungsstatus der Schaltfläche.
Dieser Zustand ist mit dem vorhandenen Zustand der Schaltfläche verknüpft.
- (NSUInteger) buttonState |
|
readwritenonatomicassigninherited |
Der Anwendungsstatus der Schaltfläche.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2023-12-02 (UTC).
[null,null,["Zuletzt aktualisiert: 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"]]