Class ccui.PageView
- Defined in: UIPageView.js
- Extends ccui.Layout
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
The PageView control of Cocos UI.
|
Method Summary
Class Detail
ccui.PageView()
The PageView control of Cocos UI.
Method Detail
-
addEventListenerPageView(selector, target)
- Parameters:
- {Function} selector
- {Object} target
-
addPage(page)Push back a page to PageView.
- Parameters:
- {ccui.Layout} page
-
addWidgetToPage(widget, pageIdx, forceCreate)Add a widget to a page of PageView.
- Parameters:
- {ccui.Widget} widget
- widget to be added to PageView.
- {number} pageIdx
- index of page.
- {Boolean} forceCreate
- if force create and there is no page exist, PageView would create a default page for adding widget.
-
allocates and initializes a UIPageView.
// example var uiPageView = ccui.PageView.create();
- Returns:
- {ccui.PageView}
-
ctor()allocates and initializes a UIPageView. Constructor of ccui.PageView
// example var uiPageView = new ccui.PageView();
-
{number} getCurPageIndex()get current page index
- Returns:
- {number}
-
{string} getDescription()Returns the "class name" of widget.
- Returns:
- {string}
-
{ccui.Layout} getPage(index)get a page from PageView by index
- Parameters:
- {Number} index
- Returns:
- {ccui.Layout}
-
{Array} getPages()get all pages of PageView
- Returns:
- {Array}
-
insertPage(page, idx)Insert a page to PageView.
- Parameters:
- {ccui.Layout} page
- page to be added to PageView.
- {Number} idx
- index
-
removeAllPages()remove all pages from PageView
-
removePage(page)Remove a page of PageView.
- Parameters:
- {ccui.Layout} page
-
removePageAtIndex(index)Remove a page at index of PageView.
- Parameters:
- {number} index
-
scrollToPage(idx)scroll PageView to index.
- Parameters:
- {number} idx
- index of page.