Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
מחלקת GCKUIbutton
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מחלקת משנה של UIButton שתומכת במצבים מותאמים אישית של אפליקציה.
המצבים האלה מתווספים לערך המאפיין state של הלחצן, כדי לספק מצבים נוספים שספציפיים לאפליקציה. אפשר להקצות תמונות למצבים המותאמים אישית הבאים, לדוגמה:
[button setImage:[UIImage imageNamed:@"myCustomStateImage"]
forState:(UIControlStateNormal | kMyControlStateCustom)];
הערכים של מצב האפליקציה חייבים להשתמש רק בביטים שמוגדרים במסיכת הסיביות UIControlStateApplication.
- Deprecated:
- שימוש בחשבון GCKUIMultistateButton.
- מאז
- 3.0
עוברת בירושה את GCKUIMultistateButton.
| - (void) setImage: |
|
(UIImage *) |
image |
| forButtonState: |
|
(NSUInteger) |
buttonState |
|
|
| |
מגדיר את התמונה שתוצג במצב לחצן נתון.
- Parameters
-
| image | The image. |
| buttonState | The button state. |
| - (UIControlState) applicationState |
|
readwritenonatomicassign |
מצב האפליקציה של הלחצן.
המצב הזה מקושר למצב הקיים של הלחצן.
| - (NSUInteger) buttonState |
|
readwritenonatomicassigninherited |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["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"]]