cocos lua TextField:addEventListener(callback)
callback = function(sender,event)
if event == ccui.TextFiledEventType.attach_with_ime then
--光标进入
elseif event == ccui.TextFiledEventType.detach_with_ime then
--光标离开 关闭键盘
elseif event == ccui.TextFiledEventType.insert_text then
--输入
local count = getStringCharCount(self.TextField:getString())
local countStr = string.format(i18n:get('Circle','anunce_text_count'),count,20)
self.desc:setString(countStr,self.Text_count:getFontSize(),self.Text_count:getTextColor(),self.Text_count:getFontName())
elseif event == ccui.TextFiledEventType.delete_backward then
--删除
end
end