quick的ScrollView可以根据getContentSize而不是根据getCascadeBoundingBox来限制滚动区域呢?

quick的ScrollView可以根据getContentSize而不是根据getCascadeBoundingBox来限制滚动区域呢?

====自己写了个扩展类解决了,不过希望quick还是能加个接口,毕竟限制区域不一定就是getCascadeBoundingBox=====

local SHNodeEx = {}

–修改 cc.ui.UIScrollView 区域限定的问题
function SHNodeEx.cascadeBoundingBox(target)
function target:getCascadeBoundingBox()
local x, y = self:getPosition()
local size = self:getContentSize()

return cc.rect(x, y, size.width, size.height)
end
return target
end

return SHNodeEx

这块可以根据自己项目需求修改源码适合自己项目就ok。怎么做都可以的。