@@ -44,7 +44,7 @@ public extension Swiftlyable {
44
44
}
45
45
46
46
let constraints = layoutArray. flatMap { l -> [ NSLayoutConstraint ] in
47
- let attributes : [ NSLayoutAttribute ]
47
+ let attributes : [ NSLayoutConstraint . Attribute ]
48
48
if let attrs = l. attributes {
49
49
attributes = attrs
50
50
} else if let attr = l. attribute {
@@ -53,7 +53,7 @@ public extension Swiftlyable {
53
53
fatalError ( " You must define an attribute. " )
54
54
}
55
55
56
- let otherAttributes : [ NSLayoutAttribute ]
56
+ let otherAttributes : [ NSLayoutConstraint . Attribute ]
57
57
if let otherAttrs = l. otherAttributes {
58
58
otherAttributes = otherAttrs
59
59
} else if let otherAttr = l. otherAttribute {
@@ -668,17 +668,17 @@ public struct Swiftly {
668
668
return Swiftly ( . centerYWithinMargins)
669
669
}
670
670
671
- let attribute : NSLayoutAttribute ?
672
- let attributes : [ NSLayoutAttribute ] ?
673
- var relatedBy : NSLayoutRelation ?
674
- var otherAttribute : NSLayoutAttribute ?
675
- var otherAttributes : [ NSLayoutAttribute ] ?
671
+ let attribute : NSLayoutConstraint . Attribute ?
672
+ let attributes : [ NSLayoutConstraint . Attribute ] ?
673
+ var relatedBy : NSLayoutConstraint . Relation ?
674
+ var otherAttribute : NSLayoutConstraint . Attribute ?
675
+ var otherAttributes : [ NSLayoutConstraint . Attribute ] ?
676
676
var multiplier : CGFloat
677
677
var constant : CGFloat
678
678
var toItem : Swiftlyable ?
679
679
var priority : UILayoutPriority ?
680
680
681
- init ( _ a: NSLayoutAttribute ? = nil , attributes atts: [ NSLayoutAttribute ] ? = nil , relatedBy r: NSLayoutRelation ? = . equal, toItem ti: Swiftlyable ? = nil , otherAttribute oa: NSLayoutAttribute ? = nil , otherAttributes otherAtts: [ NSLayoutAttribute ] ? = nil , multiplier m: CGFloat = 1 , constant c: CGFloat = 0 ) {
681
+ init ( _ a: NSLayoutConstraint . Attribute ? = nil , attributes atts: [ NSLayoutConstraint . Attribute ] ? = nil , relatedBy r: NSLayoutConstraint . Relation ? = . equal, toItem ti: Swiftlyable ? = nil , otherAttribute oa: NSLayoutConstraint . Attribute ? = nil , otherAttributes otherAtts: [ NSLayoutConstraint . Attribute ] ? = nil , multiplier m: CGFloat = 1 , constant c: CGFloat = 0 ) {
682
682
attribute = a
683
683
attributes = atts
684
684
relatedBy = r
@@ -719,7 +719,7 @@ public func ==(left: Swiftly, right: CGFloat) -> Swiftly {
719
719
if left. attribute != nil {
720
720
result. otherAttribute = . notAnAttribute
721
721
} else if let attrsCount = left. attributes? . count {
722
- result. otherAttributes = [ NSLayoutAttribute ] ( repeating: . notAnAttribute, count: attrsCount)
722
+ result. otherAttributes = [ NSLayoutConstraint . Attribute ] ( repeating: . notAnAttribute, count: attrsCount)
723
723
}
724
724
725
725
return result
@@ -796,7 +796,7 @@ public func >=(left: Swiftly, right: CGFloat) -> Swiftly {
796
796
if left. attribute != nil {
797
797
result. otherAttribute = . notAnAttribute
798
798
} else if let attrsCount = left. attributes? . count {
799
- result. otherAttributes = [ NSLayoutAttribute ] ( repeating: . notAnAttribute, count: attrsCount)
799
+ result. otherAttributes = [ NSLayoutConstraint . Attribute ] ( repeating: . notAnAttribute, count: attrsCount)
800
800
}
801
801
802
802
result. relatedBy = . greaterThanOrEqual
@@ -847,7 +847,7 @@ public func <=(left: Swiftly, right: CGFloat) -> Swiftly {
847
847
if left. attribute != nil {
848
848
result. otherAttribute = . notAnAttribute
849
849
} else if let attrsCount = left. attributes? . count {
850
- result. otherAttributes = [ NSLayoutAttribute ] ( repeating: . notAnAttribute, count: attrsCount)
850
+ result. otherAttributes = [ NSLayoutConstraint . Attribute ] ( repeating: . notAnAttribute, count: attrsCount)
851
851
}
852
852
853
853
result. relatedBy = . lessThanOrEqual
0 commit comments