mirror of https://github.com/SnapKit/SnapKit
Further fix remake constraints crash in Swift 1.2
This commit is contained in:
parent
f97ec8d1d2
commit
4158cf0d99
|
@ -402,8 +402,10 @@ public class Constraint {
|
||||||
if let view = self.installedOnView {
|
if let view = self.installedOnView {
|
||||||
// remove all installed layout constraints
|
// remove all installed layout constraints
|
||||||
var layoutConstraintsToRemove = Array<LayoutConstraint>()
|
var layoutConstraintsToRemove = Array<LayoutConstraint>()
|
||||||
if let installedLayoutConstraints = self.installedLayoutConstraints?.allObjects as? Array<LayoutConstraint> {
|
if let allObjects = self.installedLayoutConstraints?.allObjects {
|
||||||
layoutConstraintsToRemove += installedLayoutConstraints
|
if let installedLayoutConstraints = allObjects as? Array<LayoutConstraint> {
|
||||||
|
layoutConstraintsToRemove += installedLayoutConstraints
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if layoutConstraintsToRemove.count > 0 {
|
if layoutConstraintsToRemove.count > 0 {
|
||||||
|
|
Loading…
Reference in New Issue