page.verticalPageIndex(page)

Get the index for a page component with vertical pages. This is a number between 0 and the number of pages minus 1.
译:获取带有垂直页的页面组件的索引。这是一个介于0和页面数减1之间的数字。

page = new PageComponent
    width: Screen.width
    height: Screen.height

pageA = new Layer
    size: page.size

pageB = new Layer
    size: page.size

page.addPage(pageA, "bottom")
page.addPage(pageB, "bottom")

print page.verticalPageIndex(pageA)
# Prints: 0 

print page.verticalPageIndex(pageB)
# Prints: 1

results matching ""

    No results matching ""