Skip to content

Commit 0ef4079

Browse files
committed
Expose Lenght.constrain publicly.
1 parent fb4a621 commit 0ef4079

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Layout/Length.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public enum Length: Hashable, ExpressibleByFloatLiteral, ExpressibleByIntegerLit
5757

5858
extension Length {
5959

60-
func constrain<Type>(_ lhs: NSLayoutAnchor<Type>, to rhs: NSLayoutAnchor<Type>) -> NSLayoutConstraint {
60+
public func constrain<Type>(_ lhs: NSLayoutAnchor<Type>, to rhs: NSLayoutAnchor<Type>) -> NSLayoutConstraint {
6161
switch self {
6262
case .exactly(let value):
6363
return lhs.constraint(equalTo: rhs, constant: CGFloat(value))
@@ -68,7 +68,7 @@ extension Length {
6868
}
6969
}
7070

71-
func constrainToConstant(_ lhs: NSLayoutDimension) -> NSLayoutConstraint {
71+
public func constrainToConstant(_ lhs: NSLayoutDimension) -> NSLayoutConstraint {
7272
switch self {
7373
case .exactly(let value):
7474
return lhs.constraint(equalToConstant: CGFloat(value))

0 commit comments

Comments
 (0)