From 54600245b35b2591b5ca19e39c80b8d9d0ae5f9e Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Mon, 21 Mar 2022 17:22:20 +1100 Subject: Fix scroll in details view Didn't constrain details label to the bottom of the content container, so scroll view didn't pick up on it (test with large font on a smaller viewport phone). --- foray/ForayDetailViewController.swift | 1 + foray/ForayNewTableViewCell.swift | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/foray/ForayDetailViewController.swift b/foray/ForayDetailViewController.swift index 1382d24..f87e4b0 100644 --- a/foray/ForayDetailViewController.swift +++ b/foray/ForayDetailViewController.swift @@ -82,6 +82,7 @@ class ForayDetailViewController: UIViewController, ForayCoordinated { descLabel.snp.makeConstraints { (make) in make.top.equalTo(itemImageView.snp.bottom).offset(32) make.leading.trailing.equalToSuperview() + make.bottom.equalTo(container.snp.bottom).inset(16) } } diff --git a/foray/ForayNewTableViewCell.swift b/foray/ForayNewTableViewCell.swift index 26619cc..224709a 100644 --- a/foray/ForayNewTableViewCell.swift +++ b/foray/ForayNewTableViewCell.swift @@ -15,6 +15,7 @@ class ForayNewTableViewCell: UITableViewCell { let nameLabel: UILabel = { let l = UILabel() l.font = UIFont.preferredFont(forTextStyle: .headline) + l.numberOfLines = 3 l.adjustsFontForContentSizeCategory = true return l }() @@ -54,8 +55,8 @@ class ForayNewTableViewCell: UITableViewCell { make.edges.equalTo(contentView.snp.margins) } - let imageWidth = 68 - let imageHeight = 44 + let imageWidth = 64 + let imageHeight = 38 nameLabel.snp.makeConstraints { (make) in make.top.equalToSuperview() make.leading.equalToSuperview() -- cgit