aboutsummaryrefslogtreecommitdiff
path: root/foray
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--foray/ForayNewTableViewCell.swift25
1 files changed, 13 insertions, 12 deletions
diff --git a/foray/ForayNewTableViewCell.swift b/foray/ForayNewTableViewCell.swift
index e679a93..659589e 100644
--- a/foray/ForayNewTableViewCell.swift
+++ b/foray/ForayNewTableViewCell.swift
@@ -51,26 +51,27 @@ class ForayNewTableViewCell: UITableViewCell {
private func setupConstraints() {
container.snp.makeConstraints { (make) in
- make.top.bottom.equalToSuperview()
- make.trailing.leading.equalToSuperview().inset(12) // better way to do this?
+ make.edges.equalTo(contentView.snp.margins)
}
+ let imageWidth = 68
+ let imageHeight = 44
nameLabel.snp.makeConstraints { (make) in
- make.top.equalToSuperview().inset(8)
- make.leading.equalToSuperview().inset(8)
- make.trailing.equalTo(itemImageView.snp.trailing).inset(75) // better way to do this?
+ make.top.equalToSuperview()
+ make.leading.equalToSuperview()
+ make.trailing.equalTo(itemImageView.snp.trailing).inset(imageWidth)
}
descLabel.snp.makeConstraints { (make) in
make.top.equalTo(nameLabel.snp.bottom).offset(8)
- make.leading.equalToSuperview().inset(8)
- make.bottom.equalToSuperview().inset(8)
- make.trailing.equalTo(itemImageView.snp.trailing).inset(75) // better way to do this?
+ make.leading.equalToSuperview()
+ make.bottom.equalToSuperview()
+ make.trailing.equalTo(itemImageView.snp.trailing).inset(imageWidth)
}
itemImageView.snp.makeConstraints { (make) in
- make.top.equalToSuperview().inset(8)
- make.trailing.equalToSuperview().inset(8)
- make.width.equalTo(68)
- make.height.equalTo(44)
+ make.top.equalToSuperview()
+ make.trailing.equalToSuperview()
+ make.width.equalTo(imageWidth)
+ make.height.equalTo(imageHeight)
}
}