You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a crash when I'm trying to hide some of my views from the stack. I tried to remove two different views from my stack, one that doesn't have constraints inside, and another that does. The first one hides normally, the second one causes my application to crash. I'm using SnapKit to set contraints and I'm still using Swift 1.2.
I don't have time to provide more details now. Later today I'm going to try to reproduce this error in the demo app, then I'll post an update.
Thanks.
The text was updated successfully, but these errors were encountered:
I also tried the same code in Xcode 7 using the UIStackView and the vertical constraints in my custom view conflict, then the iOS break one of them and can continue without crash the app.
The crash report (you need to change the extension to .crash):
@GlaucoNeves I was seeing a similar issue due to AutoLayout constraint errors/conflicts when hiding an auto-height view with top and bottom constraints relative its subviews. I worked around this issue by storing a reference to the bottom layout constraint, then removing or adding it based on the view's hidden value:
override var hidden: Bool {
didSet {
// need to remove bottom constraint for auto-height layout else we'll get AutoLayout errors
bottomLayoutConstraint?.active = !hidden
}
}
private var bottomLayoutConstraint: NSLayoutConstraint?
I'm getting a crash when I'm trying to hide some of my views from the stack. I tried to remove two different views from my stack, one that doesn't have constraints inside, and another that does. The first one hides normally, the second one causes my application to crash. I'm using SnapKit to set contraints and I'm still using Swift 1.2.
I don't have time to provide more details now. Later today I'm going to try to reproduce this error in the demo app, then I'll post an update.
Thanks.
The text was updated successfully, but these errors were encountered: