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:
parent
e7570c9490
commit
410478e1c8
|
@ -63,9 +63,14 @@
|
||||||
NSMutableString *constraint;
|
NSMutableString *constraint;
|
||||||
BOOL firstStretchy;
|
BOOL firstStretchy;
|
||||||
uintmax_t nStretchy;
|
uintmax_t nStretchy;
|
||||||
|
NSLayoutConstraintOrientation orientation;
|
||||||
|
|
||||||
[self->v removeConstraints:[self->v constraints]];
|
[self->v removeConstraints:[self->v constraints]];
|
||||||
|
|
||||||
|
orientation = NSLayoutConstraintOrientationHorizontal;
|
||||||
|
if (self->vertical)
|
||||||
|
orientation = NSLayoutConstraintOrientationVertical;
|
||||||
|
|
||||||
views = [NSMutableDictionary new];
|
views = [NSMutableDictionary new];
|
||||||
n = 0;
|
n = 0;
|
||||||
[self->children enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {
|
[self->children enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {
|
||||||
|
|
Loading…
Reference in New Issue