cocos2d-iphone-extensions  0.2
Cocos2D Extensions API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Properties
CCLayerPanZoom Class Reference

List of all members.

Protected Attributes

CGFloat _maxScale
CGFloat _minScale
NSMutableArray * _touches
CGRect _panBoundsRect
CGFloat _touchDistance
CGFloat _maxTouchDistanceToClick
id< CCLayerPanZoomClickDelegate_delegate
CCLayerPanZoomMode _mode
CGFloat _minSpeed
CGFloat _maxSpeed
CGFloat _topFrameMargin
CGFloat _bottomFrameMargin
CGFloat _leftFrameMargin
CGFloat _rightFrameMargin
CGPoint _prevSingleTouchPositionInLayer
NSTimeInterval _singleTouchTimestamp
BOOL _touchMoveBegan
ccTime _rubberEffectRecoveryTime
CGFloat _rubberEffectRatio
BOOL _rubberEffectRecovering
BOOL _rubberEffectZooming

Properties

CGFloat maxScale
CGFloat minScale
CGRect panBoundsRect
CGFloat maxTouchDistanceToClick
id< CCLayerPanZoomClickDelegatedelegate
CCLayerPanZoomMode mode
CGFloat maxSpeed
CGFloat minSpeed
CGFloat topFrameMargin
CGFloat bottomFrameMargin
CGFloat leftFrameMargin
CGFloat rightFrameMargin
ccTime rubberEffectRecoveryTime
CGFloat rubberEffectRatio

Detailed Description

represents the layer that can be scrolled and zoomed with one or two fingers.


Property Documentation

- (CGFloat) bottomFrameMargin [read, write, assign]

Distance from bottom edge of panBoundsRect that defines bottom autoscrolling zone in frame mode. Default is 100.0f

- (id<CCLayerPanZoomClickDelegate>) delegate [read, write, assign]

Delegate for callbacks.

- (CGFloat) leftFrameMargin [read, write, assign]

Distance from left edge of panBoundsRect that defines left autoscrolling zone in frame mode. Default is 100.0f

- (CGFloat) maxScale [read, write, assign]

The maximum scale level, will change scale if needed automatically. Default is 3.0f

- (CGFloat) maxSpeed [read, write, assign]

Maximum speed for autosrolling in frame mode Default is 1000.0f

- (CGFloat) maxTouchDistanceToClick [read, write, assign]

The max distance in points that touch can be dragged before click. If traveled distance is greater then click message will not be sent to the delegate. Default is 15.0f

- (CGFloat) minScale [read, write, assign]

The minimum scale level, will change scale if needed automatically. Default is 0.5f

- (CGFloat) minSpeed [read, write, assign]

Minimum speed for autosrolling in frame mode Default is 100.0f

- (CCLayerPanZoomMode) mode [read, write, assign]

Describes layer's mode. Defult is kCCLayerPanZoomModeSheet

- (CGRect) panBoundsRect [read, write, assign]

Rectangle that is used to determine bounds of scrolling area in parent coordinates. Set it to CGRectNull to enable infinite scrolling. Default is CGRectNull

- (CGFloat) rightFrameMargin [read, write, assign]

Distance from right edge of panBoundsRect that defines right autoscrolling zone in frame mode. Default is 100.0f

- (CGFloat) rubberEffectRatio [read, write, assign]

Ratio for rubber effect. Describes the proportion of the panBoundsRect size, that layer can be moved outside from panBoundsRect border. So 0.0f means that layer can't be moved outside from bounds (rubber effect is Off) and 1.0f means that layer can be moved panBoundsRect.size.width far from left/right borders & panBoundsRect.size.height from top/bottom borders. Default is 0.5f. Limitations: only sheet mode is supported.

- (ccTime) rubberEffectRecoveryTime [read, write, assign]

Time (in seconds) to recover layer position and scale after moving out from panBoundsRect due to rubber effect. Default is 0.2f.

- (CGFloat) topFrameMargin [read, write, assign]

Distance from top edge of panBoundsRect that defines top autoscrolling zone in frame mode. Default is 100.0f


The documentation for this class was generated from the following file: