Open markst opened 9 years ago
@markst
Nope actually, but I figure it could happen if the items are reversed, right? In that case firstItem
ends up being the view controller's root view
, and firstItem
's superview
could be nil
.
Do you think it might be worth checking the secondItem
's superview
as well, to consider that scenario? Like:
UIView *superview = [(UIView *) self.firstItem superview];
if (superview == nil) {
superview = [(UIView *) self.secondItem superview];
}
if (superview) {
...
}
@ezescaruli this is true. But then I think this would be the incorrect usage of the constraint, since the value applied to the constant
then need to be reversed also?
@markst Fair point. Let's go with your fix then.
@ezescaruli has this been an issue for you at any time?