mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Add support to image alignment in ASButtonNode (#2266)
This commit is contained in:
committed by
Michael Schneider
parent
3e5b8c3096
commit
5990376f68
@@ -11,6 +11,16 @@
|
||||
#import <AsyncDisplayKit/ASTextNode.h>
|
||||
#import <AsyncDisplayKit/ASImageNode.h>
|
||||
|
||||
/**
|
||||
Image alignment defines where the image will be placed relative to the text.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, ASButtonNodeImageAlignment) {
|
||||
/** Places the image before the text. */
|
||||
ASButtonNodeImageAlignmentBeginning = 0,
|
||||
/** Places the image after the text. */
|
||||
ASButtonNodeImageAlignmentEnd = 1 << 0
|
||||
};
|
||||
|
||||
@interface ASButtonNode : ASControlNode
|
||||
|
||||
@property (nonatomic, readonly) ASTextNode * _Nonnull titleNode;
|
||||
@@ -44,6 +54,11 @@
|
||||
*/
|
||||
@property (nonatomic, assign) UIEdgeInsets contentEdgeInsets;
|
||||
|
||||
/**
|
||||
* @discusstion Whether the image should be aligned at the beginning or at the end of node. Default is `ASButtonNodeImageAlignmentBeginning`.
|
||||
*/
|
||||
@property (nonatomic, assign) ASButtonNodeImageAlignment imageAlignment;
|
||||
|
||||
/**
|
||||
* Returns the styled title associated with the specified state.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user