feat:fix warning

This commit is contained in:
pengfei.zhou 2019-12-14 14:51:18 +08:00
parent 97fc86a8b0
commit 8420980c45
3 changed files with 8 additions and 8 deletions

View File

@ -26,7 +26,7 @@ @protocol DoricFlowLayoutDelegate
- (CGFloat)doricFlowLayoutItemHeightAtIndexPath:(NSIndexPath *)indexPath; - (CGFloat)doricFlowLayoutItemHeightAtIndexPath:(NSIndexPath *)indexPath;
- (CGFloat)doricFlowLayoutItemWidthAtIndexPath:(NSIndexPath *)indexPath; - (CGFloat)doricFlowLayoutItemWidthAtIndexPath:(NSIndexPath *)indexPath;
- (BOOL)isLoadView:(NSIndexPath *)indexPath;
- (CGFloat)doricFlowLayoutColumnSpace; - (CGFloat)doricFlowLayoutColumnSpace;
- (CGFloat)doricFlowLayoutRowSpace; - (CGFloat)doricFlowLayoutRowSpace;
@ -109,7 +109,7 @@ - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSInde
maxY = MAX(maxY, [column floatValue]); maxY = MAX(maxY, [column floatValue]);
} }
y = maxY + self.rowSpace; y = maxY + self.rowSpace;
}else { } else {
self.columnHeightInfo[minYOfColumn] = @(y + height); self.columnHeightInfo[minYOfColumn] = @(y + height);
} }
UICollectionViewLayoutAttributes *attrs = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath]; UICollectionViewLayoutAttributes *attrs = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
@ -230,7 +230,7 @@ - (void)blendView:(UICollectionView *)view forPropName:(NSString *)name propValu
self.loadMoreViewId = prop; self.loadMoreViewId = prop;
} else if ([@"loadMore" isEqualToString:name]) { } else if ([@"loadMore" isEqualToString:name]) {
self.loadMore = [prop boolValue]; self.loadMore = [prop boolValue];
} else{ } else {
[super blendView:view forPropName:name propValue:prop]; [super blendView:view forPropName:name propValue:prop];
} }
} }
@ -312,7 +312,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
NSUInteger position = (NSUInteger) indexPath.row; NSUInteger position = (NSUInteger) indexPath.row;
NSDictionary *model = [self itemModelAt:position]; NSDictionary *model = [self itemModelAt:position];
NSDictionary *props = model[@"props"]; NSDictionary *props = model[@"props"];
DoricFlowLayoutViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"doricCell" forIndexPath:indexPath]; DoricFlowLayoutViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"doricCell" forIndexPath:indexPath];
if (!cell.viewNode) { if (!cell.viewNode) {
DoricFlowLayoutItemNode *itemNode = [[DoricFlowLayoutItemNode alloc] initWithContext:self.doricContext]; DoricFlowLayoutItemNode *itemNode = [[DoricFlowLayoutItemNode alloc] initWithContext:self.doricContext];
@ -320,7 +320,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
cell.viewNode = itemNode; cell.viewNode = itemNode;
[cell.contentView addSubview:itemNode.view]; [cell.contentView addSubview:itemNode.view];
} }
DoricFlowLayoutItemNode *node = cell.viewNode; DoricFlowLayoutItemNode *node = cell.viewNode;
node.viewId = model[@"id"]; node.viewId = model[@"id"];
[node blend:props]; [node blend:props];
@ -330,7 +330,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
size = CGSizeMake(collectionView.width, size.height); size = CGSizeMake(collectionView.width, size.height);
[self callJSResponse:self.onLoadMoreFuncId, nil]; [self callJSResponse:self.onLoadMoreFuncId, nil];
} }
[node.view layoutSelf:size]; [node.view layoutSelf:size];
[self callItem:position size:size]; [self callItem:position size:size];
return cell; return cell;

View File

@ -49,7 +49,7 @@ - (void)setupError:(NSException *)exception {
} }
- (BOOL)hasResult { - (BOOL)hasResult {
return self.result; return self.result != nil;
} }
- (id)getResult { - (id)getResult {

View File

@ -39,4 +39,4 @@ NSBundle *_Nonnull DoricBundle(void);
void ShowToast(NSString *_Nonnull text, DoricGravity gravity); void ShowToast(NSString *_Nonnull text, DoricGravity gravity);
UIImage *_Nonnull UIImageWithColor(UIColor *color); UIImage *_Nonnull UIImageWithColor(UIColor * _Nonnull color);