Skip to content

Commit

Permalink
Merge pull request #17 from RomanPodymov/master
Browse files Browse the repository at this point in the history
Fixed init(H: VFLComponent, options: NSLayoutConstraint.FormatOptions = []) and init(V: VFLComponent, options: NSLayoutConstraint.FormatOptions = [])
  • Loading branch information
bradhilton authored Jun 14, 2020
2 parents b44da38 + e387f1e commit 333a44f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Swiftstraints/VFLComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ public func .~(dimension: VFLComponent, priority: LayoutPriority) -> VFLComponen
/// NSLayoutConstraints(H:|-30-[versionLabel:==3.~(.high)]-10-[logoView:>=5]-30-|)
/// NSLayoutConstraints(V:|-30-[versionLabel:20]-10-[logoView]-(30.~(.required - 1))-|)

extension Array where Element: NSLayoutConstraint {
extension Array where Element == NSLayoutConstraint {
public init(H: VFLComponent, options: NSLayoutConstraint.FormatOptions = []) {
self = H.constraints(axis: .horizontal, options: options) as! [Element]
self = H.constraints(axis: .horizontal, options: options)
}
public init(V: VFLComponent, options: NSLayoutConstraint.FormatOptions = []) {
self = V.constraints(axis: .vertical, options: options) as! [Element]
self = V.constraints(axis: .vertical, options: options)
}
}

0 comments on commit 333a44f

Please sign in to comment.