horizontal layout with dynamic width to fill parent

564 views Asked by At

I have horizontal layout with 3 Children, the first has fix size, the third has fix size and align to .end and the second in center have to fill all parent size.

+-----mainnode------------------------------------+
|  +-------horizontallayout---------------------+ |
|  | [fix(10)] [ width that fill     ][fix(10)] | |
| +---------------------------------------------+ |
+-------------------------------------------------+

any ideas? I use ASStackLayoutSpec horizontal

1

There are 1 answers

1
Luca Becchetti On

found a solution:

fix1.style.flexBasis = ASDimensionMake(10)
stretch.style.flexGrow = 1
fix2.style.flexBasis = ASDimensionMake(10)