mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Fix layout of example supplementary nodes
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#import <AsyncDisplayKit/AsyncDisplayKit.h>
|
#import <AsyncDisplayKit/AsyncDisplayKit.h>
|
||||||
|
|
||||||
@interface SupplementaryNode : ASDisplayNode
|
@interface SupplementaryNode : ASCellNode
|
||||||
|
|
||||||
- (instancetype)initWithText:(NSString *)text;
|
- (instancetype)initWithText:(NSString *)text;
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ static CGFloat kInsets = 15.0;
|
|||||||
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
|
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
|
||||||
{
|
{
|
||||||
ASCenterLayoutSpec *center = [[ASCenterLayoutSpec alloc] init];
|
ASCenterLayoutSpec *center = [[ASCenterLayoutSpec alloc] init];
|
||||||
|
center.centeringOptions = ASCenterLayoutSpecCenteringXY;
|
||||||
center.child = _textNode;
|
center.child = _textNode;
|
||||||
UIEdgeInsets insets = UIEdgeInsetsMake(kInsets, kInsets, kInsets, kInsets);
|
UIEdgeInsets insets = UIEdgeInsetsMake(kInsets, kInsets, kInsets, kInsets);
|
||||||
return [ASInsetLayoutSpec insetLayoutSpecWithInsets:insets child:center];
|
return [ASInsetLayoutSpec insetLayoutSpecWithInsets:insets child:center];
|
||||||
|
|||||||
Reference in New Issue
Block a user