CCLayerPanZoom Class Reference
Overview
@class CCLayerPanZoom Class that represents the layer that can be scrolled and zoomed with one or two fingers.
Tasks
-
maxScale
The maximum scale level, will change scale if needed automatically. Default is 3.0f
property -
minScale
The minimum scale level, will change scale if needed automatically. Default is 0.5f
property -
panBoundsRect
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 -
maxTouchDistanceToClick
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 -
delegate
Delegate for callbacks.
property -
mode
Describes layer’s mode. Defult is kCCLayerPanZoomModeSheet
property -
maxSpeed
Maximum speed for autosrolling in frame mode Default is 1000.0f
property -
minSpeed
Minimum speed for autosrolling in frame mode Default is 100.0f
property -
topFrameMargin
Distance from top edge of panBoundsRect that defines top autoscrolling zone in frame mode. Default is 100.0f
property -
bottomFrameMargin
Distance from bottom edge of panBoundsRect that defines bottom autoscrolling zone in frame mode. Default is 100.0f
property -
leftFrameMargin
Distance from left edge of panBoundsRect that defines left autoscrolling zone in frame mode. Default is 100.0f
property -
rightFrameMargin
Distance from right edge of panBoundsRect that defines right autoscrolling zone in frame mode. Default is 100.0f
property -
rubberEffectRecoveryTime
Time (in seconds) to recover layer position and scale after moving out from panBoundsRect due to rubber effect. Default is 0.2f.
property -
rubberEffectRatio
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
Properties
bottomFrameMargin
Distance from bottom edge of panBoundsRect that defines bottom autoscrolling zone in frame mode. Default is 100.0f
@property (readwrite, assign) CGFloat bottomFrameMargin
Declared In
CCLayerPanZoom.h
delegate
Delegate for callbacks.
@property (readwrite, assign) id<CCLayerPanZoomClickDelegate> delegate
Declared In
CCLayerPanZoom.h
leftFrameMargin
Distance from left edge of panBoundsRect that defines left autoscrolling zone in frame mode. Default is 100.0f
@property (readwrite, assign) CGFloat leftFrameMargin
Declared In
CCLayerPanZoom.h
maxScale
The maximum scale level, will change scale if needed automatically. Default is 3.0f
@property (readwrite, assign) CGFloat maxScale
Declared In
CCLayerPanZoom.h
maxSpeed
Maximum speed for autosrolling in frame mode Default is 1000.0f
@property (readwrite, assign) CGFloat maxSpeed
Declared In
CCLayerPanZoom.h
maxTouchDistanceToClick
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 maxTouchDistanceToClick
Declared In
CCLayerPanZoom.h
minScale
The minimum scale level, will change scale if needed automatically. Default is 0.5f
@property (readwrite, assign) CGFloat minScale
Declared In
CCLayerPanZoom.h
minSpeed
Minimum speed for autosrolling in frame mode Default is 100.0f
@property (readwrite, assign) CGFloat minSpeed
Declared In
CCLayerPanZoom.h
mode
Describes layer’s mode. Defult is kCCLayerPanZoomModeSheet
@property (readwrite, assign) CCLayerPanZoomMode mode
Declared In
CCLayerPanZoom.h
panBoundsRect
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 panBoundsRect
Declared In
CCLayerPanZoom.h
rightFrameMargin
Distance from right edge of panBoundsRect that defines right autoscrolling zone in frame mode. Default is 100.0f
@property (readwrite, assign) CGFloat rightFrameMargin
Declared In
CCLayerPanZoom.h
rubberEffectRatio
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 rubberEffectRatio
Declared In
CCLayerPanZoom.h