CCLayoutBox Class Reference

Inherits from CCLayout : CCNode : CCResponder : NSObject
Declared in CCLayoutBox.h

Overview

The box layout lays out its child nodes in a horizontal row or a vertical column. Optionally you can set a spacing between the child nodes.

Note: In order to layout nodes in a grid, you can add one or more CCLayoutBox as child node with the opposite layout direction, ie the parent box layout node uses vertical and the child box layout nodes use horizontal CCLayoutBoxDirection to create a grid of nodes.

Layout Options

  direction

The direction is either horizontal or vertical.

@property (nonatomic, assign) CCLayoutBoxDirection direction

Declared In

CCLayoutBox.h

  spacing

The spacing in points between the child nodes.

@property (nonatomic, assign) float spacing

Declared In

CCLayoutBox.h