Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shrink Pager and Scroll Node #1496

Merged
merged 1 commit into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Source/ASPagerNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ @interface ASPagerNode () <ASCollectionDataSource, ASCollectionDelegate, ASColle
unsigned nodeBlockAtIndex:1;
unsigned nodeAtIndex:1;
} _pagerDataSourceFlags;
BOOL _allowsAutomaticInsetsAdjustment;

__weak id <ASPagerDelegate> _pagerDelegate;
ASPagerNodeProxy *_proxyDelegate;
Expand Down
6 changes: 2 additions & 4 deletions Source/Details/ASRangeController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#import <AsyncDisplayKit/ASAssert.h>
#import <AsyncDisplayKit/ASCellNode+Internal.h>
#import <AsyncDisplayKit/ASCollectionElement.h>
#import <AsyncDisplayKit/ASCollectionView.h>
#import <AsyncDisplayKit/ASDisplayNodeExtras.h>
#import <AsyncDisplayKit/ASDisplayNodeInternal.h> // Required for interfaceState and hierarchyState setter methods.
#import <AsyncDisplayKit/ASElementMap.h>
Expand Down Expand Up @@ -413,10 +414,7 @@ - (void)_updateVisibleNodeIndexPaths
if (ASDisplayNode.shouldShowRangeDebugOverlay) {
ASScrollDirection scrollableDirections = ASScrollDirectionUp | ASScrollDirectionDown;
if ([_dataSource isKindOfClass:NSClassFromString(@"ASCollectionView")]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
scrollableDirections = (ASScrollDirection)[_dataSource performSelector:@selector(scrollableDirections)];
#pragma clang diagnostic pop
scrollableDirections = ((ASCollectionView *)_dataSource).scrollableDirections;
}

[self updateRangeController:self
Expand Down
2 changes: 1 addition & 1 deletion Source/Details/ASScrollDirection.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

NS_ASSUME_NONNULL_BEGIN

typedef NS_OPTIONS(NSInteger, ASScrollDirection) {
typedef NS_OPTIONS(unsigned char, ASScrollDirection) {
ASScrollDirectionNone = 0,
ASScrollDirectionRight = 1 << 0,
ASScrollDirectionLeft = 1 << 1,
Expand Down