tbointeractive / bytes

bytes is a set of Swift tools to cover many all-day tasks in iOS development.
MIT License
7 stars 1 forks source link

Add priority to LayoutConstraint methods #45

Closed thorstenstark closed 4 years ago

thorstenstark commented 4 years ago

Example

now:

@objc @discardableResult func constrainEqual(attribute: NSLayoutConstraint.Attribute, to constant: CGFloat) -> NSLayoutConstraint

new:

@objc @discardableResult func constrainEqual(attribute: NSLayoutConstraint.Attribute, to constant: CGFloat, priority: UILayoutPriority) -> NSLayoutConstraint

brototyp commented 4 years ago

Nice! We did that in our implementation as well. We added a default parameter (= .required) to the priority to be backwards compatible.

thorstenstark commented 4 years ago

Yeah, I had the same idea, but forgot to add it here 😅