iOS: fix type error
This commit is contained in:
parent
5c089f1b7c
commit
de8d102bc8
@ -91,10 +91,10 @@ - (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect {
|
|||||||
- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
|
- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
NSNumber *minYOfColumn = @(0);
|
NSNumber *minYOfColumn = @(0);
|
||||||
NSArray<NSNumber *> *keys = self.columnHeightInfo.allKeys;
|
NSArray<NSNumber *> *keys = self.columnHeightInfo.allKeys;
|
||||||
NSArray<NSNumber *> *sortedKeys = [keys sortedArrayUsingComparator:^NSComparisonResult(NSNumber * obj1, NSNumber *obj2) {
|
NSArray<NSNumber *> *sortedKeys = [keys sortedArrayUsingComparator:^NSComparisonResult(NSNumber *obj1, NSNumber *obj2) {
|
||||||
return [obj1 intValue] <= [obj2 intValue] ? -1 : 1;
|
return [obj1 intValue] <= [obj2 intValue] ? -1 : 1;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
for (NSNumber *key in sortedKeys) {
|
for (NSNumber *key in sortedKeys) {
|
||||||
if ([self.columnHeightInfo[key] floatValue] < [self.columnHeightInfo[minYOfColumn] floatValue]) {
|
if ([self.columnHeightInfo[key] floatValue] < [self.columnHeightInfo[minYOfColumn] floatValue]) {
|
||||||
minYOfColumn = key;
|
minYOfColumn = key;
|
||||||
@ -164,7 +164,7 @@ @interface DoricFlowLayoutNode () <UICollectionViewDataSource, UICollectionViewD
|
|||||||
@property(nonatomic, copy) NSString *onScrollFuncId;
|
@property(nonatomic, copy) NSString *onScrollFuncId;
|
||||||
@property(nonatomic, copy) NSString *onScrollEndFuncId;
|
@property(nonatomic, copy) NSString *onScrollEndFuncId;
|
||||||
@property(nonatomic, strong) DoricJSDispatcher *jsDispatcher;
|
@property(nonatomic, strong) DoricJSDispatcher *jsDispatcher;
|
||||||
@property(nonatomic, assign) NSUInteger loadAnchor;
|
@property(nonatomic, assign) NSInteger loadAnchor;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation DoricFlowLayoutNode
|
@implementation DoricFlowLayoutNode
|
||||||
@ -350,7 +350,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
|
|||||||
} else {
|
} else {
|
||||||
node.view.width = (collectionView.width - (self.columnCount - 1) * self.columnSpace) / self.columnCount;
|
node.view.width = (collectionView.width - (self.columnCount - 1) * self.columnSpace) / self.columnCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (position >= self.itemCount && self.onLoadMoreFuncId) {
|
if (position >= self.itemCount && self.onLoadMoreFuncId) {
|
||||||
[self callLoadMore];
|
[self callLoadMore];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user