コントロールのASdisplayNodeをセルと非常に一致させる方法を教えてください。コントロールASdisplayNodeの高さはセルの高さと一致します
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize{
NSMutableArray *rightArray =[[NSMutableArray alloc]initWithObjects:_titleNode, _descNode,nil];
[rightArray addObjectsFromArray:_replayNodes];
ASStackLayoutSpec *verStackLayout = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionVertical spacing:8 justifyContent:ASStackLayoutJustifyContentStart alignItems:ASStackLayoutAlignItemsStart children:rightArray];
verStackLayout.style.flexGrow = YES;
verStackLayout.style.flexShrink = YES;
self.dateNode.style.preferredSize = CGSizeMake(130 ,50);//How high is the height of cell?
self.dateNode.style.flexShrink = YES;
ASStackLayoutSpec *horStackLayout = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionHorizontal spacing:10 justifyContent:ASStackLayoutJustifyContentStart alignItems:ASStackLayoutAlignItemsStart children:@[self.dateNode,verStackLayout]];
horStackLayout.style.flexShrink = YES;
return horStackLayout;
}
外観:https://github.com/TextureGroup/Texture/tree/master/examples/VerticalWithinHorizontalScrolling – Bimawa
ありがとうございましたが、それは私の問題ではありません。私の行は、ASTableNode-cellの高さによって異なります。固定値ではありません。 – freda