cocos2dx edit编辑框点击后显示一个键盘,但是非常的不灵活,点return才能隐藏,如果我们需要点键盘外的背景,实现隐藏键盘,那就方便多了
方法:
1. 到EGLView.mm下 注释2个reurn,这样就能保证显示软键盘的时候,还能将点击事件传送到最底层
// Pass the touches to the superview
#pragma mark EAGLView - Touch Delegate
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
if (isKeyboardShown_)
{
[self handleTouchesAfterKeyboardShow];
//WARNING:commented by Teng.点触背景隐藏软键盘