From 6f2b810e8e11ba5161a539d46248aadbb0add16e Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Sat, 19 Mar 2022 13:36:10 +1100 Subject: Adjust offsets and fix details label lines --- foray/ForayNewDetailView.swift | 5 +++-- foray/ForayNewTableViewCell.swift | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/foray/ForayNewDetailView.swift b/foray/ForayNewDetailView.swift index e7d7dbf..e8e2262 100644 --- a/foray/ForayNewDetailView.swift +++ b/foray/ForayNewDetailView.swift @@ -28,6 +28,7 @@ class ForayNewDetailView: UIView { let l = UILabel() l.font = UIFont.preferredFont(forTextStyle: .body) l.adjustsFontForContentSizeCategory = true + l.numberOfLines = 10 return l }() @@ -53,12 +54,12 @@ class ForayNewDetailView: UIView { make.leading.trailing.equalToSuperview().inset(8) } itemImageView.snp.makeConstraints { (make) in - make.top.equalTo(nameLabel.snp.bottom).offset(8) + make.top.equalTo(nameLabel.snp.bottom).offset(32) make.leading.trailing.equalToSuperview() make.height.equalTo(150) } descLabel.snp.makeConstraints { (make) in - make.top.equalTo(itemImageView.snp.bottom).offset(8) + make.top.equalTo(itemImageView.snp.bottom).offset(32) make.leading.trailing.equalToSuperview() } } diff --git a/foray/ForayNewTableViewCell.swift b/foray/ForayNewTableViewCell.swift index 659589e..26619cc 100644 --- a/foray/ForayNewTableViewCell.swift +++ b/foray/ForayNewTableViewCell.swift @@ -21,7 +21,7 @@ class ForayNewTableViewCell: UITableViewCell { let descLabel: UILabel = { let l = UILabel() - l.font = UIFont.preferredFont(forTextStyle: .body) + l.font = UIFont.preferredFont(forTextStyle: .caption1) l.adjustsFontForContentSizeCategory = true return l }() @@ -62,7 +62,7 @@ class ForayNewTableViewCell: UITableViewCell { make.trailing.equalTo(itemImageView.snp.trailing).inset(imageWidth) } descLabel.snp.makeConstraints { (make) in - make.top.equalTo(nameLabel.snp.bottom).offset(8) + make.top.equalTo(nameLabel.snp.bottom) make.leading.equalToSuperview() make.bottom.equalToSuperview() make.trailing.equalTo(itemImageView.snp.trailing).inset(imageWidth) -- cgit