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