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
Maybe it is my misunderstanding about how AutoLayout or Masonry work, but it seems to me like the order of calling -makeContraints: in iOS7 is somehow order dependant.
Here is a very simple example:
Expected Result
A very simple view, with a yellow view on top and a blue view on bottom: Expected Result (Gist)
It's probably due to a implementation change in how iOS7 handles ambiguous constraints, do you get any console messages?.
I think your problem lies in the fact you are using make.top.greaterThanOrEqualTo(superview.top).offset(padding);
have you tried using make.top.equalTo(superview.top).offset(padding); instead?
By using make.top.greaterThanOrEqualTo(superview.top).offset(padding); you are basically telling Auto Layout this view can be anywhere vertically as long as it's more than padding.
greaterThanOrEqualTo is best used if you have more than one constraint on that NSLayoutAttribute otherwise Auto Layout may treat it as ambiguous which has weird results.
iOS7 Bug?
Maybe it is my misunderstanding about how AutoLayout or Masonry work, but it seems to me like the order of calling
-makeContraints:
in iOS7 is somehow order dependant.Here is a very simple example:
Expected Result
A very simple view, with a yellow view on top and a blue view on bottom:
Expected Result (Gist)
Possible Bug
All I do is switch the order
-makeContraints:
is called, calling yellowView first :Possible Bug Result (Gist)
On iOS6 this seems to work fine.
So is this a bug or am I missing something?
The text was updated successfully, but these errors were encountered: