fix: AutoLayout warning for poll UI
This commit is contained in:
parent
376cb3d58a
commit
1e691a2a76
|
@ -39,5 +39,7 @@ extension PollSection {
|
|||
itemAttribute: PollItem.Attribute
|
||||
) {
|
||||
cell.optionLabel.text = pollOption.title
|
||||
cell.configureCheckmark(state: itemAttribute.voted ? .on : .off)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -276,6 +276,7 @@ extension StatusView {
|
|||
activeTextLabel.trailingAnchor.constraint(equalTo: statusTextContainerView.trailingAnchor),
|
||||
statusTextContainerView.bottomAnchor.constraint(greaterThanOrEqualTo: activeTextLabel.bottomAnchor),
|
||||
])
|
||||
activeTextLabel.setContentCompressionResistancePriority(.required - 1, for: .vertical)
|
||||
contentWarningBlurContentImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
statusTextContainerView.addSubview(contentWarningBlurContentImageView)
|
||||
NSLayoutConstraint.activate([
|
||||
|
@ -320,6 +321,9 @@ extension StatusView {
|
|||
pollStatusStackView.addArrangedSubview(pollVoteCountLabel)
|
||||
pollStatusStackView.addArrangedSubview(pollStatusDotLabel)
|
||||
pollStatusStackView.addArrangedSubview(pollCountdownLabel)
|
||||
pollVoteCountLabel.setContentHuggingPriority(.defaultHigh + 2, for: .horizontal)
|
||||
pollStatusDotLabel.setContentHuggingPriority(.defaultHigh + 1, for: .horizontal)
|
||||
pollCountdownLabel.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
||||
|
||||
// action toolbar container
|
||||
containerStackView.addArrangedSubview(actionToolbarContainer)
|
||||
|
|
|
@ -128,7 +128,7 @@ extension PollOptionTableViewCell {
|
|||
roundedBackgroundView.layer.cornerCurve = .circular
|
||||
|
||||
checkmarkBackgroundView.layer.masksToBounds = true
|
||||
checkmarkBackgroundView.layer.cornerRadius = checkmarkBackgroundView.bounds.height * 0.5
|
||||
checkmarkBackgroundView.layer.cornerRadius = PollOptionTableViewCell.checkmarkImageSize.width * 0.5
|
||||
checkmarkBackgroundView.layer.cornerCurve = .circular
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue