mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-12 01:10:49 +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
939 B
Objective-C
36 lines
939 B
Objective-C
//
|
|
// TailLoadingNode.m
|
|
// Sample
|
|
//
|
|
// Created by Adlai Holler on 1/3/17.
|
|
// Copyright © 2017 Facebook. All rights reserved.
|
|
//
|
|
|
|
#import "TailLoadingNode.h"
|
|
|
|
@interface TailLoadingNode ()
|
|
@property (nonatomic, strong) ASDisplayNode *activityIndicatorNode;
|
|
@end
|
|
|
|
@implementation TailLoadingNode
|
|
|
|
- (instancetype)init
|
|
{
|
|
if (self = [super init]) {
|
|
_activityIndicatorNode = [[ASDisplayNode alloc] initWithViewBlock:^{
|
|
UIActivityIndicatorView *v = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
|
|
[v startAnimating];
|
|
return v;
|
|
}];
|
|
self.style.height = ASDimensionMake(100);
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
|
|
{
|
|
return [ASCenterLayoutSpec centerLayoutSpecWithCenteringOptions:ASCenterLayoutSpecCenteringXY sizingOptions:ASCenterLayoutSpecSizingOptionMinimumXY child:self.activityIndicatorNode];
|
|
}
|
|
|
|
@end
|