lua代码如下
local psc9 = ccui.Scale9Sprite:create(path);
local label = cc.Label:createWithTTF(name, fontpath, 28)
local button = cc.ControlButton:create(label, psc9);
button:setPosition(self.visibleSize.width / 2, orginY - i * 40);
--button:setPreferredSize(cc.size(100, 40));
layer:addChild(button, 1);
button:registerControlEventHandler(callback, cc.CONTROL_EVENTTYPE_TOUCH_UP_INSIDE)
