Skip to content

Commit

Permalink
Patch ASTableView in a different way
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-malik committed Sep 13, 2019
1 parent 12c50e0 commit 9c95d2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/ASTableView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#import <AsyncDisplayKit/ASDelegateProxy.h>
#import <AsyncDisplayKit/ASDisplayNodeExtras.h>
#import <AsyncDisplayKit/ASDisplayNode+FrameworkPrivate.h>
#import <AsyncDisplayKit/ASDisplayNodeInternal.h>
#import <AsyncDisplayKit/ASElementMap.h>
#import <AsyncDisplayKit/ASInternalHelpers.h>
#import <AsyncDisplayKit/ASLayout.h>
Expand All @@ -28,6 +29,7 @@
#import <AsyncDisplayKit/ASTableLayoutController.h>
#import <AsyncDisplayKit/ASBatchContext.h>


static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";

//#define LOG(...) NSLog(__VA_ARGS__)
Expand Down Expand Up @@ -118,6 +120,12 @@ - (void)setElement:(ASCollectionElement *)element
// This is actually a workaround for a bug we are seeing in some rare cases (selected background view
// overlaps other cells if size of ASCellNode has changed.)
self.clipsToBounds = node.clipsToBounds;

// If the cell node has been explicitly configured with a tint color, we can apply that directly to the cell view to preserve the previous behavior
UIColor *nodeTintColor = node->_tintColor;
if (nodeTintColor != nil) {
self.tintColor = nodeTintColor;
}
}

[node __setSelectedFromUIKit:self.selected];
Expand Down

0 comments on commit 9c95d2f

Please sign in to comment.