Skip to content

Commit

Permalink
More spacer fixes!
Browse files Browse the repository at this point in the history
  • Loading branch information
noremac committed Nov 10, 2020
1 parent efd3b12 commit bd05b9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Layout/UIView Extensions/Spacers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public final class HorizontalSpacer: UIView {
self.minimumLength = minimumLength
super.init(frame: .zero)
setContentHuggingPriority(.init(1), for: .horizontal)
setContentCompressionResistancePriority(.required, for: .horizontal)
setContentCompressionResistancePriority(.init(1), for: .horizontal)
applyConstraints(.fixedWidth(minimumLength) ~ .defaultLow)
}

Expand All @@ -41,7 +41,7 @@ public final class HorizontalSpacer: UIView {
}

public override var intrinsicContentSize: CGSize {
CGSize(width: minimumLength, height: UIView.noIntrinsicMetric)
CGSize(width: 8000, height: UIView.noIntrinsicMetric)
}
}

Expand All @@ -52,7 +52,7 @@ public final class VerticalSpacer: UIView {
self.minimumLength = minimumLength
super.init(frame: .zero)
setContentHuggingPriority(.init(1), for: .vertical)
setContentCompressionResistancePriority(.required, for: .vertical)
setContentCompressionResistancePriority(.init(1), for: .vertical)
applyConstraints(.fixedHeight(minimumLength) ~ .defaultLow)
}

Expand All @@ -62,6 +62,6 @@ public final class VerticalSpacer: UIView {
}

public override var intrinsicContentSize: CGSize {
CGSize(width: UIView.noIntrinsicMetric, height: minimumLength)
CGSize(width: UIView.noIntrinsicMetric, height: 8000)
}
}

0 comments on commit bd05b9c

Please sign in to comment.