Skip to content

Commit 1e85258

Browse files
author
Emilio Pavia
authored
Merge pull request #27 from arduino/fix-issue-18
Fix trial card header labels alignment
2 parents 0585e6e + 8ef8882 commit 1e85258

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ScienceJournal/UI/TrialCardHeaderView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class TrialCardHeaderView: UIView {
9393
addSubview(titleLabel)
9494
applyLabelStyles(to: titleLabel)
9595

96+
titleLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal)
9697
titleLabel.translatesAutoresizingMaskIntoConstraints = false
9798
let titleInsets = UIEdgeInsets(top: ExperimentCardView.innerVerticalPadding,
9899
left: ExperimentCardView.innerHorizontalPadding,
@@ -104,6 +105,7 @@ class TrialCardHeaderView: UIView {
104105
addSubview(durationLabel)
105106
applyLabelStyles(to: durationLabel)
106107

108+
durationLabel.setContentHuggingPriority(.defaultLow, for: .horizontal)
107109
durationLabel.translatesAutoresizingMaskIntoConstraints = false
108110
let durationInsets = UIEdgeInsets(top: ExperimentCardView.innerVerticalPadding,
109111
left: 0,

0 commit comments

Comments
 (0)