Commit 0cfc17c8 authored by Steven杜宇's avatar Steven杜宇

// 活动图片

parent 39fc3db5
...@@ -108,13 +108,17 @@ extension YHActivityDetailCell1 { ...@@ -108,13 +108,17 @@ extension YHActivityDetailCell1 {
totalImgHeight += item.height totalImgHeight += item.height
self.imgsContentView.addSubview(item.imgView) self.imgsContentView.addSubview(item.imgView)
item.imgView.snp.remakeConstraints { make in item.imgView.snp.remakeConstraints { make in
var gap = 0.0
if index == 0 { if index == 0 {
make.top.equalTo(self.imgsContentView.snp.top).offset(item.height > 0 ? 24.0 : 0.0) gap = item.height > 0 ? 24.0 : 0.0
make.top.equalTo(self.imgsContentView.snp.top).offset(gap)
} else { } else {
if let lastView = theLastView { if let lastView = theLastView {
make.top.equalTo(lastView.snp.bottom).offset(item.height > 0 ? 24.0 : 0.0) gap = item.height > 0 ? 24.0 : 0.0
make.top.equalTo(lastView.snp.bottom).offset(gap)
} }
} }
totalImgHeight += gap
make.height.equalTo(item.height) make.height.equalTo(item.height)
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment