Skip to content

Commit

Permalink
Expose Lenght.constrain publicly.
Browse files Browse the repository at this point in the history
  • Loading branch information
srdanrasic committed Dec 25, 2018
1 parent fb4a621 commit 0ef4079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Layout/Length.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public enum Length: Hashable, ExpressibleByFloatLiteral, ExpressibleByIntegerLit

extension Length {

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

func constrainToConstant(_ lhs: NSLayoutDimension) -> NSLayoutConstraint {
public func constrainToConstant(_ lhs: NSLayoutDimension) -> NSLayoutConstraint {
switch self {
case .exactly(let value):
return lhs.constraint(equalToConstant: CGFloat(value))
Expand Down

0 comments on commit 0ef4079

Please sign in to comment.