CCLayerPanZoom Class Reference
Overview
@class CCLayerPanZoom Class that represents the layer that can be scrolled and zoomed with one or two fingers.
Tasks
-
maxScaleThe maximum scale level, will change scale if needed automatically. Default is 3.0f
property -
minScaleThe minimum scale level, will change scale if needed automatically. Default is 0.5f
property -
panBoundsRectRectangle that is used to determine bounds of scrolling area in parent coordinates. Set it to CGRectNull to enable infinite scrolling. Default is CGRectNull
property -
maxTouchDistanceToClickThe 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
property -
delegateDelegate for callbacks.
property -
modeDescribes layer’s mode. Defult is kCCLayerPanZoomModeSheet
property -
maxSpeedMaximum speed for autosrolling in frame mode Default is 1000.0f
property -
minSpeedMinimum speed for autosrolling in frame mode Default is 100.0f
property -
topFrameMarginDistance from top edge of panBoundsRect that defines top autoscrolling zone in frame mode. Default is 100.0f
property -
bottomFrameMarginDistance from bottom edge of panBoundsRect that defines bottom autoscrolling zone in frame mode. Default is 100.0f
property -
leftFrameMarginDistance from left edge of panBoundsRect that defines left autoscrolling zone in frame mode. Default is 100.0f
property -
rightFrameMarginDistance from right edge of panBoundsRect that defines right autoscrolling zone in frame mode. Default is 100.0f
property -
rubberEffectRecoveryTimeTime (in seconds) to recover layer position and scale after moving out from panBoundsRect due to rubber effect. Default is 0.2f.
property -
rubberEffectRatioRatio 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.
property
Properties
bottomFrameMargin
Distance from bottom edge of panBoundsRect that defines bottom autoscrolling zone in frame mode. Default is 100.0f
@property (readwrite, assign) CGFloat bottomFrameMarginDeclared In
CCLayerPanZoom.hdelegate
Delegate for callbacks.
@property (readwrite, assign) id<CCLayerPanZoomClickDelegate> delegateDeclared In
CCLayerPanZoom.hleftFrameMargin
Distance from left edge of panBoundsRect that defines left autoscrolling zone in frame mode. Default is 100.0f
@property (readwrite, assign) CGFloat leftFrameMarginDeclared In
CCLayerPanZoom.hmaxScale
The maximum scale level, will change scale if needed automatically. Default is 3.0f
@property (readwrite, assign) CGFloat maxScaleDeclared In
CCLayerPanZoom.hmaxSpeed
Maximum speed for autosrolling in frame mode Default is 1000.0f
@property (readwrite, assign) CGFloat maxSpeedDeclared In
CCLayerPanZoom.hmaxTouchDistanceToClick
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
@property (readwrite, assign) CGFloat maxTouchDistanceToClickDeclared In
CCLayerPanZoom.hminScale
The minimum scale level, will change scale if needed automatically. Default is 0.5f
@property (readwrite, assign) CGFloat minScaleDeclared In
CCLayerPanZoom.hminSpeed
Minimum speed for autosrolling in frame mode Default is 100.0f
@property (readwrite, assign) CGFloat minSpeedDeclared In
CCLayerPanZoom.hmode
Describes layer’s mode. Defult is kCCLayerPanZoomModeSheet
@property (readwrite, assign) CCLayerPanZoomMode modeDeclared In
CCLayerPanZoom.hpanBoundsRect
Rectangle that is used to determine bounds of scrolling area in parent coordinates. Set it to CGRectNull to enable infinite scrolling. Default is CGRectNull
@property (readwrite, assign) CGRect panBoundsRectDeclared In
CCLayerPanZoom.hrightFrameMargin
Distance from right edge of panBoundsRect that defines right autoscrolling zone in frame mode. Default is 100.0f
@property (readwrite, assign) CGFloat rightFrameMarginDeclared In
CCLayerPanZoom.hrubberEffectRatio
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.
@property (readwrite, assign) CGFloat rubberEffectRatioDeclared In
CCLayerPanZoom.h