Let ScrollView swallow touch events by default.

This commit is contained in:
Zen 2016-02-12 21:21:57 +08:00
parent eb55a0e603
commit 07051a0357
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ void ScrollView::setTouchEnabled(bool enabled)
if (enabled)
{
_touchListener = EventListenerTouchOneByOne::create();
_touchListener->setSwallowTouches(true);
_touchListener->onTouchBegan = CC_CALLBACK_2(ScrollView::onTouchBegan, this);
_touchListener->onTouchMoved = CC_CALLBACK_2(ScrollView::onTouchMoved, this);
_touchListener->onTouchEnded = CC_CALLBACK_2(ScrollView::onTouchEnded, this);