用cocos2dx引擎开发手游时,如果用cocosstudio编辑器中输入框或代码cc.EditBox:create()做输入框功能时,遇到了在苹果机上面点击输入框弹出的软键盘遮挡住下面的底层界面输入框的问题,用ccui.EditBox:create()没有这种问题出现。
local textCurrentBg = cc.Scale9Sprite:create("NewRes/match/chaoduandiban.png")
local textCurrentMinNum = ccui.EditBox:create(cc.size(91,42),textCurrentBg,textCurrentBg)
-- local textCurrentMinNum = cc.EditBox:create(cc.size(91,42),textCurrentBg)
textCurrentMinNum:setFontSize(22)
textCurrentMinNum:setPosition(cc.p(746.5,402.5))
self._widget:addChild(textCurrentMinNum)
--最少参赛人数限制
local function ditBoxMinNumTextEventHandle(strEventName,pSender)
if strEventName == "ended" then
end
end
textCurrentMinNum:registerScriptEditBoxHandler(ditBoxMinNumTextEventHandle)@H_502_56@