add constness to UIPageView

This commit is contained in:
andyque 2014-05-27 10:44:31 +08:00
parent 78ac4b4d86
commit e1f9ff7eaa
2 changed files with 4 additions and 4 deletions

View File

@ -200,12 +200,12 @@ void PageView::updateBoundaryPages()
_rightBoundaryChild = _pages.at(this->getPageCount()-1);
}
ssize_t PageView::getPageCount()
ssize_t PageView::getPageCount()const
{
return _pages.size();
}
float PageView::getPositionXByIndex(ssize_t idx)
float PageView::getPositionXByIndex(ssize_t idx)const
{
return (getSize().width * (idx-_curPageIdx));
}

View File

@ -178,8 +178,8 @@ CC_CONSTRUCTOR_ACCESS:
protected:
Layout* createPage();
float getPositionXByIndex(ssize_t idx);
ssize_t getPageCount();
float getPositionXByIndex(ssize_t idx)const;
ssize_t getPageCount()const;
void updateBoundaryPages();
virtual bool scrollPages(float touchOffset);