Remove check for [UIDevice systemVersion] check if running on iOS 7 (#1843)

This commit is contained in:
Michael Schneider 2016-07-03 21:47:35 -07:00 committed by appleguy
parent d8c0253321
commit c20f452dca
3 changed files with 4 additions and 15 deletions

View File

@ -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];

View File

@ -8,9 +8,9 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#include <CoreGraphics/CGBase.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreGraphics/CGBase.h>
#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
/**

View File

@ -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