diff --git a/Pod/Classes/Shader/DoricFlowLayoutNode.m b/Pod/Classes/Shader/DoricFlowLayoutNode.m index 4154d78a..81079cc9 100644 --- a/Pod/Classes/Shader/DoricFlowLayoutNode.m +++ b/Pod/Classes/Shader/DoricFlowLayoutNode.m @@ -26,7 +26,7 @@ @protocol DoricFlowLayoutDelegate - (CGFloat)doricFlowLayoutItemHeightAtIndexPath:(NSIndexPath *)indexPath; - (CGFloat)doricFlowLayoutItemWidthAtIndexPath:(NSIndexPath *)indexPath; -- (BOOL)isLoadView:(NSIndexPath *)indexPath; + - (CGFloat)doricFlowLayoutColumnSpace; - (CGFloat)doricFlowLayoutRowSpace; @@ -109,7 +109,7 @@ - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSInde maxY = MAX(maxY, [column floatValue]); } y = maxY + self.rowSpace; - }else { + } else { self.columnHeightInfo[minYOfColumn] = @(y + height); } UICollectionViewLayoutAttributes *attrs = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath]; @@ -230,7 +230,7 @@ - (void)blendView:(UICollectionView *)view forPropName:(NSString *)name propValu self.loadMoreViewId = prop; } else if ([@"loadMore" isEqualToString:name]) { self.loadMore = [prop boolValue]; - } else{ + } else { [super blendView:view forPropName:name propValue:prop]; } } @@ -312,7 +312,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection NSUInteger position = (NSUInteger) indexPath.row; NSDictionary *model = [self itemModelAt:position]; NSDictionary *props = model[@"props"]; - + DoricFlowLayoutViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"doricCell" forIndexPath:indexPath]; if (!cell.viewNode) { DoricFlowLayoutItemNode *itemNode = [[DoricFlowLayoutItemNode alloc] initWithContext:self.doricContext]; @@ -320,7 +320,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection cell.viewNode = itemNode; [cell.contentView addSubview:itemNode.view]; } - + DoricFlowLayoutItemNode *node = cell.viewNode; node.viewId = model[@"id"]; [node blend:props]; @@ -330,7 +330,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection size = CGSizeMake(collectionView.width, size.height); [self callJSResponse:self.onLoadMoreFuncId, nil]; } - + [node.view layoutSelf:size]; [self callItem:position size:size]; return cell; diff --git a/Pod/Classes/Util/DoricAsyncResult.m b/Pod/Classes/Util/DoricAsyncResult.m index e70b8805..fd3257dc 100644 --- a/Pod/Classes/Util/DoricAsyncResult.m +++ b/Pod/Classes/Util/DoricAsyncResult.m @@ -49,7 +49,7 @@ - (void)setupError:(NSException *)exception { } - (BOOL)hasResult { - return self.result; + return self.result != nil; } - (id)getResult { diff --git a/Pod/Classes/Util/DoricUtil.h b/Pod/Classes/Util/DoricUtil.h index a6706b18..11634c9c 100644 --- a/Pod/Classes/Util/DoricUtil.h +++ b/Pod/Classes/Util/DoricUtil.h @@ -39,4 +39,4 @@ NSBundle *_Nonnull DoricBundle(void); void ShowToast(NSString *_Nonnull text, DoricGravity gravity); -UIImage *_Nonnull UIImageWithColor(UIColor *color); +UIImage *_Nonnull UIImageWithColor(UIColor * _Nonnull color);