0

I've just started using ComponentKit and seems really straightforward so far, but having a little trouble with flexbox. How would I go about vertically aligning components inside a horizontal CKStackLayoutComponent? What my first attempt was is to add another CKStackLayoutComponent as a child and set that to vertical, and add my components to that, but that crashes on launch.

Any ideas?

  • Can you include the crash log, and maybe some sample code and a screenshot of what you want? – Adam Ernst Apr 08 '15 at 18:47
  • Are you looking to align 3 items horizontally? or nest 2 items into a single item on top of each other? A - B - C with A at the top, B at the bottom and C centered vertically? or A - B/C with B and C vertically over each other? – Will Moore Apr 09 '15 at 00:23
  • Managed to accomplish this, see below – aaronschubert0 Apr 09 '15 at 09:35

1 Answers1

0

Hey Guys was able to fix this, the problem was because I had the CKStackLayoutComponent as a sub component of CKBackgroundLayoutComponent and I think I was trying to add more than one child when it expects only one child.

The way I fixed it was having a horizontal CKStackLayoutComponent and then having two children of CKStackLayoutComponent type, both vertical direction. This way you can have things aligned in two columns.