Added an orientation variable to the tBox code for when we start dealing with hugging. This is the proper way to prevent controls from stretching.

This commit is contained in:
Pietro Gagliardi 2015-08-02 23:42:14 -04:00
parent e7570c9490
commit 410478e1c8
1 changed files with 5 additions and 0 deletions

View File

@ -63,9 +63,14 @@
NSMutableString *constraint;
BOOL firstStretchy;
uintmax_t nStretchy;
NSLayoutConstraintOrientation orientation;
[self->v removeConstraints:[self->v constraints]];
orientation = NSLayoutConstraintOrientationHorizontal;
if (self->vertical)
orientation = NSLayoutConstraintOrientationVertical;
views = [NSMutableDictionary new];
n = 0;
[self->children enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {