mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Replace ASButtonState with ASControlState
This commit is contained in:
@@ -34,6 +34,13 @@ typedef NS_OPTIONS(NSUInteger, ASControlNodeEvent)
|
||||
ASControlNodeEventAllEvents = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, ASControlState) {
|
||||
ASControlStateNormal = 0,
|
||||
ASControlStateHighlighted = 1 << 0, // used when ASControlNode isHighlighted is set
|
||||
ASControlStateDisabled = 1 << 1,
|
||||
ASControlStateSelected = 1 << 2, // used when ASControlNode isSeleted is set
|
||||
ASControlStateReserved = 0xFF000000 // flags reserved for internal framework use
|
||||
};
|
||||
|
||||
/**
|
||||
@abstract ASControlNode is the base class for control nodes (such as buttons), or nodes that track touches to invoke targets with action messages.
|
||||
@@ -55,6 +62,12 @@ typedef NS_OPTIONS(NSUInteger, ASControlNodeEvent)
|
||||
*/
|
||||
@property (nonatomic, readonly, assign, getter=isHighlighted) BOOL highlighted;
|
||||
|
||||
/**
|
||||
@abstract Indicates whether or not the receiver is highlighted.
|
||||
@discussion This is set automatically when the receiver is tapped.
|
||||
*/
|
||||
@property (nonatomic, assign, getter=isSeleted) BOOL selected;
|
||||
|
||||
#pragma mark - Tracking Touches
|
||||
/**
|
||||
@abstract Indicates whether or not the receiver is currently tracking touches related to an event.
|
||||
|
||||
Reference in New Issue
Block a user