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,9 +402,11 @@ public class Constraint {
|
|||
if let view = self.installedOnView {
|
||||
// remove all installed layout constraints
|
||||
var layoutConstraintsToRemove = Array<LayoutConstraint>()
|
||||
if let installedLayoutConstraints = self.installedLayoutConstraints?.allObjects as? Array<LayoutConstraint> {
|
||||
if let allObjects = self.installedLayoutConstraints?.allObjects {
|
||||
if let installedLayoutConstraints = allObjects as? Array<LayoutConstraint> {
|
||||
layoutConstraintsToRemove += installedLayoutConstraints
|
||||
}
|
||||
}
|
||||
|
||||
if layoutConstraintsToRemove.count > 0 {
|
||||
view.removeConstraints(layoutConstraintsToRemove)
|
||||
|
|
Loading…
Reference in New Issue