请问怎么添加 ScrollView.EventType监听事件

creator版本:1.4.0
问题:我添加ScrollView.EventType.BOUNCE_BOTTOM 监听事件后,滚到底后回调函数没有触发。

代码:
properties: {
label: {
default: null,
type: cc.Label
},

   nodellScrollview: cc.Node,
    // defaults, set visually when attaching this script to the Canvas
    text: 'Hello, World!'
},

onLoad: function ()
{
this.label.string = this.text;
var self = this;
this.nodellScrollview.on(cc.ScrollView.EventType.BOUNCE_BOTTOM, self.OnScrollEnd, self);
},

OnScrollEnd:function()
{
cc.log(“触摸到底,反弹函数”);
},

请问该怎么修改?

this.nodellScrollview.on(cc.ScrollView.EventType.BOUNCE_BOTTOM, self.OnScrollEnd, self);

改成

this.nodellScrollview.on("bounce-bottom", self.OnScrollEnd, self);

试试?

谢谢子龙大大,监听事件有了,为啥改成这个可以了? 还有事件不是滚动视图滚动到底部边界并且开始回弹时发出的事件,现在是滚到底部就出发这个函数了,只有一只往下滚就会一只出发。

因为事件都是按照字符串来监听的,你那个枚举是回调函数里面用的。

哦哦 谢谢子龙大大

子龙大大,我这滑动到list底部 总是监听不到bounce-bottom 事件,scroll-ended 和 scrolling事件都可以的, 这是咋回事啊, help

对了 代码贴一波