From bb0df27486b892a36b262054105da853dde89403 Mon Sep 17 00:00:00 2001 From: CMK Date: Mon, 12 Jul 2021 19:20:24 +0800 Subject: [PATCH] fix: poll option cell not set fixed height issue --- Mastodon/Scene/Share/View/Content/StatusView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mastodon/Scene/Share/View/Content/StatusView.swift b/Mastodon/Scene/Share/View/Content/StatusView.swift index 86c820bb0..e596b39e4 100644 --- a/Mastodon/Scene/Share/View/Content/StatusView.swift +++ b/Mastodon/Scene/Share/View/Content/StatusView.swift @@ -152,6 +152,7 @@ final class StatusView: UIView { let pollTableView: PollTableView = { let tableView = PollTableView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) tableView.register(PollOptionTableViewCell.self, forCellReuseIdentifier: String(describing: PollOptionTableViewCell.self)) + tableView.rowHeight = PollOptionView.height tableView.isScrollEnabled = false tableView.separatorStyle = .none tableView.backgroundColor = .clear @@ -450,7 +451,7 @@ extension StatusView { // action toolbar container containerStackView.addArrangedSubview(actionToolbarContainer) containerStackView.sendSubviewToBack(actionToolbarContainer) - actionToolbarContainer.setContentCompressionResistancePriority(.defaultLow, for: .vertical) + actionToolbarContainer.setContentCompressionResistancePriority(.defaultHigh, for: .vertical) actionToolbarContainer.setContentHuggingPriority(.required - 1, for: .vertical) headerContainerView.isHidden = true