We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee322a3 commit 39b7237Copy full SHA for 39b7237
Demo/Pins/Components/PinButton.swift
@@ -1,9 +1,5 @@
1
import Pinwheel
2
3
-public extension CGFloat {
4
- static let buttonHeight: CGFloat = 50
5
-}
6
-
7
class PinButton: View {
8
var primary: Button!
9
var primaryDisabled: Button!
Pinwheel/Sources/Pinwheel/Components/Button.swift
@@ -76,6 +76,9 @@ public class Button: UIButton {
76
if let superview = superview, let _ = title {
77
widthAnchor.constraint(greaterThanOrEqualToConstant: Button.buttonWidth).isActive = true
78
widthAnchor.constraint(lessThanOrEqualTo: superview.widthAnchor, constant: -.spacingXL).isActive = true
79
+
80
+ setContentHuggingPriority(.defaultHigh, for: .horizontal)
81
+ setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
82
}
83
84
0 commit comments