added priority
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
6604036bf7
commit
17705efcb8
@ -49,8 +49,8 @@ extension UILayoutGuide {
|
|||||||
/// Adds a heightAnchor.
|
/// Adds a heightAnchor.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func height(_ constant: CGFloat) -> Self {
|
public func height(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
height(constant: constant)
|
height(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,8 +58,8 @@ extension UILayoutGuide {
|
|||||||
/// Adds a heightAnchor where the height constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the height constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func heightGreaterThanEqualTo(_ constant: CGFloat) -> Self {
|
public func heightGreaterThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
heightGreaterThanEqualTo(constant: constant)
|
heightGreaterThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,8 +67,8 @@ extension UILayoutGuide {
|
|||||||
/// Adds a heightAnchor where the height constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the height constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func heightLessThanEqualTo(_ constant: CGFloat) -> Self {
|
public func heightLessThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
heightLessThanEqualTo(constant: constant)
|
heightLessThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,24 +76,24 @@ extension UILayoutGuide {
|
|||||||
/// Adds a heightAnchor for the constant passed into the method.
|
/// Adds a heightAnchor for the constant passed into the method.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func height(constant: CGFloat) -> NSLayoutConstraint {
|
public func height(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
heightAnchor.constraint(equalToConstant: constant).activate()
|
heightAnchor.constraint(equalToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a heightAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func heightGreaterThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func heightGreaterThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
heightAnchor.constraint(greaterThanOrEqualToConstant: constant).activate()
|
heightAnchor.constraint(greaterThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a heightAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func heightLessThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func heightLessThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
heightAnchor.constraint(lessThanOrEqualToConstant: constant).activate()
|
heightAnchor.constraint(lessThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -107,8 +107,8 @@ extension UILayoutGuide {
|
|||||||
/// Adds a widthAnchor.
|
/// Adds a widthAnchor.
|
||||||
/// - Parameter constant: Width Constant size.
|
/// - Parameter constant: Width Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func width(_ constant: CGFloat) -> Self {
|
public func width(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
width(constant: constant)
|
width(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,8 +116,8 @@ extension UILayoutGuide {
|
|||||||
/// Adds a widthAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a widthAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func widthGreaterThanEqualTo(_ constant: CGFloat) -> Self {
|
public func widthGreaterThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
widthGreaterThanEqualTo(constant: constant)
|
widthGreaterThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,8 +125,8 @@ extension UILayoutGuide {
|
|||||||
/// Adds a widthAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a widthAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func widthLessThanEqualTo(_ constant: CGFloat) -> Self {
|
public func widthLessThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
widthLessThanEqualTo(constant: constant)
|
widthLessThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,24 +134,24 @@ extension UILayoutGuide {
|
|||||||
/// Adds a widthAnchor for the constant passed into the method.
|
/// Adds a widthAnchor for the constant passed into the method.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func width(constant: CGFloat) -> NSLayoutConstraint {
|
public func width(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
widthAnchor.constraint(equalToConstant: constant).activate()
|
widthAnchor.constraint(equalToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a widthAnchor with the constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a widthAnchor with the constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func widthGreaterThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func widthGreaterThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
widthAnchor.constraint(greaterThanOrEqualToConstant: constant).activate()
|
widthAnchor.constraint(greaterThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a widthAnchor with the constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a widthAnchor with the constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func widthLessThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func widthLessThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
widthAnchor.constraint(lessThanOrEqualToConstant: constant).activate()
|
widthAnchor.constraint(lessThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,8 +56,8 @@ extension UIView {
|
|||||||
/// Adds a heightAnchor.
|
/// Adds a heightAnchor.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func height(_ constant: CGFloat) -> Self {
|
public func height(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
height(constant: constant)
|
height(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,8 +65,8 @@ extension UIView {
|
|||||||
/// Adds a heightAnchor where the height constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the height constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func heightGreaterThanEqualTo(_ constant: CGFloat) -> Self {
|
public func heightGreaterThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
heightGreaterThanEqualTo(constant: constant)
|
heightGreaterThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,8 +74,8 @@ extension UIView {
|
|||||||
/// Adds a heightAnchor where the height constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the height constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func heightLessThanEqualTo(_ constant: CGFloat) -> Self {
|
public func heightLessThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
heightLessThanEqualTo(constant: constant)
|
heightLessThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,24 +83,24 @@ extension UIView {
|
|||||||
/// Adds a heightAnchor for the constant passed into the method.
|
/// Adds a heightAnchor for the constant passed into the method.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func height(constant: CGFloat) -> NSLayoutConstraint {
|
public func height(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
heightAnchor.constraint(equalToConstant: constant).activate()
|
heightAnchor.constraint(equalToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a heightAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func heightGreaterThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func heightGreaterThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
heightAnchor.constraint(greaterThanOrEqualToConstant: constant).activate()
|
heightAnchor.constraint(greaterThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a heightAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a heightAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func heightLessThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func heightLessThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
heightAnchor.constraint(lessThanOrEqualToConstant: constant).activate()
|
heightAnchor.constraint(lessThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -114,8 +114,8 @@ extension UIView {
|
|||||||
/// Adds a widthAnchor.
|
/// Adds a widthAnchor.
|
||||||
/// - Parameter constant: Width Constant size.
|
/// - Parameter constant: Width Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func width(_ constant: CGFloat) -> Self {
|
public func width(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
width(constant: constant)
|
width(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,8 +123,8 @@ extension UIView {
|
|||||||
/// Adds a widthAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a widthAnchor where the constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func widthGreaterThanEqualTo(_ constant: CGFloat) -> Self {
|
public func widthGreaterThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
widthGreaterThanEqualTo(constant: constant)
|
widthGreaterThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,8 +132,8 @@ extension UIView {
|
|||||||
/// Adds a widthAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a widthAnchor where the constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: Yourself.
|
/// - Returns: Yourself.
|
||||||
public func widthLessThanEqualTo(_ constant: CGFloat) -> Self {
|
public func widthLessThanEqualTo(_ constant: CGFloat, _ priority: UILayoutPriority = .required) -> Self {
|
||||||
widthLessThanEqualTo(constant: constant)
|
widthLessThanEqualTo(constant: constant, priority: priority)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,24 +141,24 @@ extension UIView {
|
|||||||
/// Adds a widthAnchor for the constant passed into the method.
|
/// Adds a widthAnchor for the constant passed into the method.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func width(constant: CGFloat) -> NSLayoutConstraint {
|
public func width(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
widthAnchor.constraint(equalToConstant: constant).activate()
|
widthAnchor.constraint(equalToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a widthAnchor with the constant passed in using a greaterThanOrEqualTo Constraint.
|
/// Adds a widthAnchor with the constant passed in using a greaterThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func widthGreaterThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func widthGreaterThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
widthAnchor.constraint(greaterThanOrEqualToConstant: constant).activate()
|
widthAnchor.constraint(greaterThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
/// Adds a widthAnchor with the constant passed in using a lessThanOrEqualTo Constraint.
|
/// Adds a widthAnchor with the constant passed in using a lessThanOrEqualTo Constraint.
|
||||||
/// - Parameter constant: Constant size.
|
/// - Parameter constant: Constant size.
|
||||||
/// - Returns: The Constraint that was created.
|
/// - Returns: The Constraint that was created.
|
||||||
public func widthLessThanEqualTo(constant: CGFloat) -> NSLayoutConstraint {
|
public func widthLessThanEqualTo(constant: CGFloat, priority: UILayoutPriority = .required) -> NSLayoutConstraint {
|
||||||
widthAnchor.constraint(lessThanOrEqualToConstant: constant).activate()
|
widthAnchor.constraint(lessThanOrEqualToConstant: constant).with { $0.priority = priority; $0.isActive = true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user