mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-15 16:36:36 +00:00
* Reimplement IGListKit support in a cleaner way * Rename and fix some stuff * Fix supplementaries more * Update docs * Update test * Cleanup minor things * Tweak it * Indentation * Remove irrelevant changes * Break out cell into its own file * Fix indentation * Address feedback
36 lines
892 B
Objective-C
36 lines
892 B
Objective-C
//
|
|
// FeedHeaderNode.m
|
|
// Sample
|
|
//
|
|
// Created by Adlai Holler on 1/23/17.
|
|
// Copyright © 2017 Facebook. All rights reserved.
|
|
//
|
|
|
|
#import "FeedHeaderNode.h"
|
|
#import "Utilities.h"
|
|
|
|
static UIEdgeInsets kFeedHeaderInset = { .top = 20, .bottom = 20, .left = 10, .right = 10 };
|
|
|
|
@interface FeedHeaderNode ()
|
|
@property (nonatomic, strong, readonly) ASTextNode *textNode;
|
|
@end
|
|
|
|
@implementation FeedHeaderNode
|
|
|
|
- (instancetype)init
|
|
{
|
|
if (self = [super init]) {
|
|
_textNode = [[ASTextNode alloc] init];
|
|
self.automaticallyManagesSubnodes = YES;
|
|
_textNode.attributedText = [NSAttributedString attributedStringWithString:@"Latest Posts" fontSize:18 color:[UIColor darkGrayColor] firstWordColor:nil];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
|
|
{
|
|
return [ASInsetLayoutSpec insetLayoutSpecWithInsets:kFeedHeaderInset child:_textNode];
|
|
}
|
|
|
|
@end
|