0

I use 2.x cocos2d-x. And I use CCScrollView.

I create new CCLayer extended class and, add CCScrollView on the instance.

When I am scrolling, and I try to scroll again. getContentOffset always show Y is 0.

void MyClass::scrollViewDidScroll(
    enter code here`CCScrollView* view) {
    CCLOG("%f", view->getContentOffset().y);

it always returns 0.0.

I added cell. and cell has button. So, I make the CCControl size small. But, I never had resolved.

Would you tell me how to fix it?

Wez Sie Tato
  • 1,186
  • 12
  • 33
shinriyo
  • 344
  • 3
  • 17

1 Answers1

0

I resolved by myself.

I must set not only container's height bat also width larger than view size.

even if I set like this

setDirection(kCCScrollViewDirectionVertical)
shinriyo
  • 344
  • 3
  • 17