Fixed empty boxes.

This commit is contained in:
Pietro Gagliardi 2015-08-03 12:17:56 -04:00
parent f7c5c6e60e
commit f66e2e569e
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,9 @@
uintmax_t nStretchy; uintmax_t nStretchy;
NSLayoutConstraintOrientation orientation; NSLayoutConstraintOrientation orientation;
if ([self->children count] == 0)
goto selfOnly;
[self->v removeConstraints:[self->v constraints]]; [self->v removeConstraints:[self->v constraints]];
orientation = NSLayoutConstraintOrientationHorizontal; orientation = NSLayoutConstraintOrientationHorizontal;
@ -140,6 +143,7 @@ NSLog(@"%@", constraint);
[views release]; [views release];
// and now populate for self // and now populate for self
selfOnly:
p->view = self->v; p->view = self->v;
p->attachLeft = YES; p->attachLeft = YES;
p->attachTop = YES; p->attachTop = YES;