#import <CC3ControllableLayer.h>
A CCLayer that keeps track of the CC3ViewController that is controlling the CC3GLView, and provides support for overlaying the device camera, and adapting to changes to the device orientation.
- (void) didUpdateContentSizeFrom: |
|
(CGSize) |
oldSize |
|
This callback method is invoked automatically whenever the contentSize property of this layer is changed.
This method is not invoked if the contentSize property is set to its current value.
Default implementation does nothing. Subclasses can override this method to organize child nodes or perspective to the new contentSize.
When the device orientation changes, the CC3UIViewController will set the contentSize of the CCNode in its controlledNode property to match the new view size and shape. If the node being controlled is an instance of CC3ControllableLayer, this method will therefore automatically be invoked. Subclasses can use this to adapt to the new size caused by the device orientation change.
- (id) initWithColor: |
|
(ccColor4B) |
DEPRECATED_ATTRIBUTE |
|
- Deprecated:
- Use init instead. The controller property is set automatically when the layer, or an ancestor is assigned to a controller.
Allocates and initializes a layer.
+ (id) layerWithColor: |
|
(ccColor4B) |
DEPRECATED_ATTRIBUTE |
|
- Deprecated:
- Use layer instead. The controller property is set automatically when the layer, or an ancestor is assigned to a controller.
- Deprecated:
- CC3ControllableLayer no longer automatically resizes on device orientation. This property always returns NO, and setting this property has no effect. When the device is rotated, the contentSize property of the CCNode held in the controlledNode property of the CC3UIViewController is set to match the new orientation. Override didUpdateContentSizeFrom: to react to this change.
- (BOOL) isOverlayingDeviceCamera |
|
readnonatomicassign |
Indicates whether this layer is currently overlaying the view of the device camera, permitting an augmented reality view.
This property is readonly and is retrieved by this node from its controller. If no controller has been assigned, this property will default to NO. When this property is YES, this layer will generally behave in a way that is friendly to a background device camera image. When true, this layer will set its background GL color to transparent, and will not draw a background color or texture.
The documentation for this class was generated from the following file: