فئة GCKUIButton
فئة فرعية من UIButton تتوافق مع حالات التطبيق المخصّصة.
يتم ربط هذه الحالات باستخدام OR على قيمة خاصية state للزر لتقديم حالات إضافية خاصة بالتطبيق. يمكن تخصيص الصور للحالات المخصّصة التالية، على سبيل المثال:
[button setImage:[UIImage imageNamed:@"myCustomStateImage"]
forState:(UIControlStateStandard | 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 و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2023-12-02 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2023-12-02 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]