mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Add custom collection view layout example project
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
// FIXME: Temporary nonsense import until method names are finalized and exposed
|
||||
#import "ASDisplayNode+Subclasses.h"
|
||||
|
||||
const static NSUInteger kASCollectionViewAnimationNone = UITableViewRowAnimationNone;
|
||||
|
||||
static const NSUInteger kASCollectionViewAnimationNone = UITableViewRowAnimationNone;
|
||||
static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero};
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Proxying.
|
||||
@@ -664,7 +664,14 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
|
||||
- (ASSizeRange)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
ASSizeRange constrainedSize;
|
||||
ASSizeRange constrainedSize = [_layoutInspector collectionView:self constrainedSizeForNodeAtIndexPath:indexPath];
|
||||
|
||||
if (!ASSizeRangeEqualToSizeRange(constrainedSize, kInvalidSizeRange)) {
|
||||
return constrainedSize;
|
||||
}
|
||||
|
||||
// TODO: Move this logic into the flow layout inspector. Create a simple inspector for non-flow layouts that don't
|
||||
// implement a custom inspector.
|
||||
if (_asyncDataSourceImplementsConstrainedSizeForNode) {
|
||||
constrainedSize = [_asyncDataSource collectionView:self constrainedSizeForNodeAtIndexPath:indexPath];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user