标签:
只需要在自定义的PhotoContainerView中做一下判断就可以了
if (self.photoNamesArray.count == 1) { [self setupAutoWidthFlowItems:[temp copy] withPerRowItemsCount:1 verticalMargin:10 horizontalMargin:10 verticalEdgeInset:0 horizontalEdgeInset:0]; } else if (self.photoNamesArray.count == 2) { [self setupAutoWidthFlowItems:[temp copy] withPerRowItemsCount:2 verticalMargin:10 horizontalMargin:10 verticalEdgeInset:0 horizontalEdgeInset:0]; } else { [self setupAutoWidthFlowItems:[temp copy] withPerRowItemsCount:3 verticalMargin:10 horizontalMargin:10 verticalEdgeInset:0 horizontalEdgeInset:0]; }
标签:
原文地址:http://www.cnblogs.com/mafeng/p/5858038.html