OS X auto-layout prevents window resizing

Viewed 1397

One for the auto-layout gurus out there: I don't understand why the following auto-layout setup prevents resizing of the window.

I have three views organized this way:

-----------------
|           |   |
|     F     | S |
|           |   |
-----------------
|     B     |
-------------

S has a fixed with, B has a fixed height, and F should always have S's height and B's width. This is what I set up in terms of constraints:

[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[F(>=100)][S(==100)]|"
                                                             options:0
                                                             metrics:nil
                                                               views:@{ @"F": _f, @"S": _s }]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[F(>=100)][B(==100)]|"
                                                             options:0
                                                             metrics:nil
                                                               views:@{ @"F": _f, @"B": _b }]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[B(==F)]"
                                                             options:0
                                                             metrics:nil
                                                               views:@{ @"B": _b, @"F": _f }]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[S(==F)]"
                                                             options:0
                                                             metrics:nil
                                                               views:@{ @"S": _s, @"F": _f }]];

The way I see things, this should allow me to resize the window freely, with F resizing to fill the space. But the constraints lock the window resizing completely.

Any idea what I'm doing wrong?

Thanks

2 Answers
Related