diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index abcab6c9e9..c3ebbbe0c6 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -9,6 +9,7 @@ // #import "ASAssert.h" +#import "ASAvailability.h" #import "ASBatchFetching.h" #import "ASDelegateProxy.h" #import "ASCellNode+Internal.h" @@ -592,7 +593,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; cell.node = node; [_rangeController configureContentView:cell.contentView forCellNode:node]; - if (ASRunningOnOS7()) { + if (!AS_AT_LEAST_IOS8) { // Even though UICV was introduced in iOS 6, and UITableView has always had the equivalent method, // -willDisplayCell: was not introduced until iOS 8 for UICV. didEndDisplayingCell, however, is available. [self collectionView:collectionView willDisplayCell:cell forItemAtIndexPath:indexPath]; diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.h b/AsyncDisplayKit/Private/ASInternalHelpers.h index cff8c1fc53..f80f3c82e0 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.h +++ b/AsyncDisplayKit/Private/ASInternalHelpers.h @@ -8,9 +8,9 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#include -#import #import +#import + #import "ASBaseDefines.h" ASDISPLAYNODE_EXTERN_C_BEGIN @@ -35,8 +35,6 @@ CGFloat ASCeilPixelValue(CGFloat f); CGFloat ASRoundPixelValue(CGFloat f); -BOOL ASRunningOnOS7(); - ASDISPLAYNODE_EXTERN_C_END /** diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.mm b/AsyncDisplayKit/Private/ASInternalHelpers.mm index 4d4ccbbf74..4538edf1cd 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.mm +++ b/AsyncDisplayKit/Private/ASInternalHelpers.mm @@ -89,16 +89,6 @@ CGFloat ASRoundPixelValue(CGFloat f) return roundf(f * ASScreenScale()) / ASScreenScale(); } -BOOL ASRunningOnOS7() -{ - static BOOL isOS7 = NO; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - isOS7 = ([[UIDevice currentDevice].systemVersion floatValue] < 8.0); - }); - return isOS7; -} - @implementation NSIndexPath (ASInverseComparison) - (NSComparisonResult)asdk_inverseCompare:(NSIndexPath *)otherIndexPath