iOS: fix type error

This commit is contained in:
pengfei.zhou 2021-07-15 16:39:57 +08:00 committed by osborn
parent 5c089f1b7c
commit de8d102bc8

View File

@ -91,10 +91,10 @@ - (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect {
- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
NSNumber *minYOfColumn = @(0);
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;
}];
for (NSNumber *key in sortedKeys) {
if ([self.columnHeightInfo[key] floatValue] < [self.columnHeightInfo[minYOfColumn] floatValue]) {
minYOfColumn = key;
@ -164,7 +164,7 @@ @interface DoricFlowLayoutNode () <UICollectionViewDataSource, UICollectionViewD
@property(nonatomic, copy) NSString *onScrollFuncId;
@property(nonatomic, copy) NSString *onScrollEndFuncId;
@property(nonatomic, strong) DoricJSDispatcher *jsDispatcher;
@property(nonatomic, assign) NSUInteger loadAnchor;
@property(nonatomic, assign) NSInteger loadAnchor;
@end
@implementation DoricFlowLayoutNode
@ -350,7 +350,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
} else {
node.view.width = (collectionView.width - (self.columnCount - 1) * self.columnSpace) / self.columnCount;
}
if (position >= self.itemCount && self.onLoadMoreFuncId) {
[self callLoadMore];
}