Beta 4 Updates

This commit is contained in:
Robert Payne 2016-08-02 19:56:16 +12:00
parent 9f8ad44677
commit 4715badfa0
4 changed files with 15 additions and 15 deletions

View File

@ -201,7 +201,7 @@ public class Constraint {
#endif
// set install info
self.installInfo = ConstraintInstallInfo(view: installOnView, layoutConstraints: HashTable.weakObjects())
self.installInfo = ConstraintInstallInfo(view: installOnView, layoutConstraints: NSHashTable.weakObjects())
// store which layout constraints are installed for this constraint
for layoutConstraint in newLayoutConstraints {
@ -219,8 +219,8 @@ public class Constraint {
self.installInfo = nil
}
guard let installedLayoutConstraints = self.installInfo?.layoutConstraints.allObjects as? [LayoutConstraint]
where installedLayoutConstraints.count > 0 else {
guard let installedLayoutConstraints = self.installInfo?.layoutConstraints.allObjects as? [LayoutConstraint],
installedLayoutConstraints.count > 0 else {
return
}
@ -250,8 +250,8 @@ public class Constraint {
}
#endif
guard let layoutConstraints = self.installInfo?.layoutConstraints.allObjects as? [LayoutConstraint]
where layoutConstraints.count > 0 else {
guard let layoutConstraints = self.installInfo?.layoutConstraints.allObjects as? [LayoutConstraint],
layoutConstraints.count > 0 else {
return
}
@ -265,8 +265,8 @@ public class Constraint {
}
#endif
guard let layoutConstraints = self.installInfo?.layoutConstraints.allObjects as? [LayoutConstraint]
where layoutConstraints.count > 0 else {
guard let layoutConstraints = self.installInfo?.layoutConstraints.allObjects as? [LayoutConstraint],
layoutConstraints.count > 0 else {
return
}
@ -278,9 +278,9 @@ public class Constraint {
private final class ConstraintInstallInfo {
private weak var view: ConstraintView? = nil
private let layoutConstraints: HashTable<AnyObject>
private let layoutConstraints: NSHashTable<AnyObject>
private init(view: ConstraintView?, layoutConstraints: HashTable<AnyObject>) {
private init(view: ConstraintView?, layoutConstraints: NSHashTable<AnyObject>) {
self.view = view
self.layoutConstraints = layoutConstraints
}

View File

@ -28,7 +28,7 @@
#endif
internal struct ConstraintAttributes: OptionSet, Boolean {
internal struct ConstraintAttributes: OptionSet {
internal init(rawValue: UInt) {
self.rawValue = rawValue

View File

@ -56,8 +56,8 @@ public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool {
// must both have valid targets and identical attributes
guard let target1 = lhs.target,
let target2 = rhs.target
where target1 === target2 && lhs.attributes == rhs.attributes else {
let target2 = rhs.target,
target1 === target2 && lhs.attributes == rhs.attributes else {
return false
}

View File

@ -62,7 +62,7 @@ public extension LayoutConstraint {
if self.constant > 0.0 {
description += " + \(self.constant)"
} else if self.constant < 0.0 {
description += " - \(CGFloat.abs(self.constant))"
description += " - \(abs(self.constant))"
}
}