|
|
|
@ -32,10 +32,19 @@ extension UIView { |
|
|
|
|
static func spacer(height: CGFloat = 1) -> UIView { |
|
|
|
|
let view = UIView(frame: .zero) |
|
|
|
|
view.translatesAutoresizingMaskIntoConstraints = false |
|
|
|
|
|
|
|
|
|
NSLayoutConstraint.activate([ |
|
|
|
|
view.heightAnchor.constraint(equalToConstant: height), |
|
|
|
|
]) |
|
|
|
|
return view |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static func spacerWidth(_ width: CGFloat = 1) -> UIView { |
|
|
|
|
let view = UIView(frame: .zero) |
|
|
|
|
view.translatesAutoresizingMaskIntoConstraints = false |
|
|
|
|
|
|
|
|
|
NSLayoutConstraint.activate([ |
|
|
|
|
view.widthAnchor.constraint(equalToConstant: width), |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
return view |
|
|
|
|
} |
|
|
|
|