cocos2d-x cctextfielttf 调出虚拟键盘后


void HelloWorld::ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event)

{

static int flag;

CCLOG("ccTouchesEnded,%d",++flag);

passWord->attachWithIME();

passWord->setDelegate(this);

this->setPosition(ccp(0, 320));

CCLOG("userNameString: %s",userNameString.c_str());

}

在点击layer后,调出键盘,键盘出来后,layer在点击就无效,求大神解答。

这是你要到EAGLView.mm中分别注释2个return

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

if (isKeyboardShown_)

{

self handleTouchesAfterKeyboardShow];

//return;

}

....

}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

{

if (isKeyboardShown_)

{

//return;

}

...

}