Cocos Creator API

1.4.x

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

PageView

Extends ScrollView
Module: cc

The PageView control

Properties

sizeMode PageView.SizeMode

Specify the size type of each page in PageView.

direction PageView.Direction

The page view direction

scrollThreshold Number

The scroll threshold value, when drag exceeds this value, release the next page will automatically scroll, less than the restore

autoPageTurningThreshold Number

Auto page turning velocity threshold. When users swipe the PageView quickly, it will calculate a velocity based on the scroll distance and time, if the calculated velocity is larger than the threshold, then it will trigger page turning.

pageTurningEventTiming Number

Change the PageTurning event timing of PageView.

indicator PageViewIndicator

The Page View Indicator

pageEvents Component.EventHandler[]

PageView events callback

content Node

Inherited from ScrollView:

This is a reference to the UI element to be scrolled.

horizontal Boolean

Inherited from ScrollView:

Enable horizontal scroll.

vertical Boolean

Inherited from ScrollView:

Enable vertical scroll.

inertia Boolean

Inherited from ScrollView:

When inertia is set, the content will continue to move when touch ended.

brake Number

Inherited from ScrollView:

It determines how quickly the content stop moving. A value of 1 will stop the movement immediately. A value of 0 will never stop the movement until it reaches to the boundary of scrollview.

elastic Boolean

Inherited from ScrollView:

When elastic is set, the content will be bounce back when move out of boundary.

bounceDuration Number

Inherited from ScrollView:

The elapse time of bouncing back. A value of 0 will bounce back immediately.

horizontalScrollBar Scrollbar

Inherited from ScrollView:

The horizontal scrollbar reference.

verticalScrollBar Scrollbar

Inherited from ScrollView:

The vertical scrollbar reference.

scrollEvents Component.EventHandler[]

Inherited from ScrollView:

Scrollview events callback

cancelInnerEvents Boolean

Inherited from ScrollView:

If cancelInnerEvents is set to true, the scroll behavior will cancel touch events on inner content nodes It's set to true by default.

__eventTargets Array private

Inherited from Component:

Register all related EventTargets, all event callbacks will be removed in _onPreDestroy

node Node

Inherited from Component:

The node this component is attached to. A component is always attached to a node.

examples:

cc.log(comp.node);

uuid String readOnly

Inherited from Component:

The uuid for editor.

examples:

cc.log(comp.uuid);

_enabled Boolean private

Inherited from Component:

enabled Boolean

Inherited from Component:

indicates whether this component is enabled or not.

examples:

comp.enabled = true;
cc.log(comp.enabled);

enabledInHierarchy Boolean readOnly

Inherited from Component:

indicates whether this component is enabled and its node is also active in the hierarchy.

examples:

cc.log(comp.enabledInHierarchy);

_isOnLoadCalled Boolean readOnly

Inherited from Component:

TODO

examples:

cc.log(_isOnLoadCalled);

_name String private

_objFlags Number private