所以我有一个包含不同数量图像的单元格的tableview ...我使用自动布局将它们显示在单元格的水平列表中。这是一个片段:
NSArray *subviews = @[self.imageView1, self.imageView2, self.imageView3, self.imageView4, self.imageView5];
[self.imageView1 autoMatchDimension:ALDimensionHeight toDimension:ALDimensionWidth ofView:self.imageView1];
[subviews autoMatchViewsDimension:ALDimensionHeight];
[subviews autoDistributeViewsAlongAxis:ALAxisHorizontal withFixedSpacing:10.0f insetSpacing:NO alignment:NSLayoutFormatAlignAllCenterY];
[self.imageView1 autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.titleLabel withOffset:kLabelVerticalInsets relation:NSLayoutRelationEqual];
[self.imageView1 autoPinEdgeToSuperviewEdge:ALEdgeLeading withInset:kLabelHorizontalInsets];
[self.imageView1 autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:kLabelVerticalInsets];
我用以下内容加载图片:
loadImageForURLString:
一旦图像加载,我希望单元格包装我的标签和图像。如何使用自动布局执行此操作?
谢谢!