Had the same issue - the solution is to stop the opengl layer from rendering while this is happening. Here’s what I did:

1) Register for keyboard frame change events at start of application. I did this in AppController.mm

- (BOOL)application:(UIApplication
*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

...

[[NSNotificationCenterdefaultCenter]
addObserver:self

selector:@selector(keyboardWillChangeFrame:)

name:UIKeyboardWillChangeFrameNotification

object:nil];//UIKeyboardWillChangeFrameNotification

[[NSNotificationCenterdefaultCenter]
addObserver:self

selector:@selector(keyboardDidChangeFrame:)

name:UIKeyboardDidChangeFrameNotification

object:nil];




...

}

2) Started and stopped rendering during keyboard animation.

-(void)keyboardWillChangeFrame:(NSNotification *)notification {

NSLog(@"keyboardWillChangeFrame");

// stop openGL animation while animating keyboard

cocos2d::CCDirector::sharedDirector()->stopAnimation();

}

-(void)keyboardDidChangeFrame:(NSNotification *)notification {// restart openGL animation
when keyboard stops animating

cocos2d::CCDirector::sharedDirector()->startAnimation();

}

上面是从google上搜出来的答案,百度找了非常久没找到答案。 :《  google常常不好用。。。

okay,到眼下为止。键盘分拆,浮动,收回动作能够完美展现。可是出现了一点瑕疵,键盘收起时,会出现输入框中的字有闪烁,以挑剔的眼光来说,这是个问题:

看上面代码,在键盘出现变化时。停止全部的动画。键盘结束时继续,debug后发现就是在动画停止的时候文字消失。開始动画后出现。

推断是由于控件儿在停止编辑事件/键盘收起事件中有又一次设置文字信息。

经过查找:在CCEditBoxImplIOS.mm中发现了---

- (BOOL)textFieldShouldEndEditing:(UITextField *)sender

{

CCLOG("textFieldShouldEndEditing...");

editState_ =
NO;

getEditBoxImplIOS()->setText(getEditBoxImplIOS()->getText());

cocos2d::extension::CCEditBoxDelegate* pDelegate =
getEditBoxImplIOS()->getDelegate();

if (pDelegate != NULL)

{

pDelegate->editBoxEditingDidEnd(getEditBoxImplIOS()->getCCEditBox());

pDelegate->editBoxReturn(getEditBoxImplIOS()->getCCEditBox());

}

cocos2d::extension::CCEditBox*  pEditBox=
getEditBoxImplIOS()->getCCEditBox();

if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())

{

cocos2d::CCScriptEngineProtocol* pEngine =
cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine();

pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(),
"ended",pEditBox);

pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(),
"return",pEditBox);

}

if(editBox_ !=
nil)

{

// getEditBoxImplIOS()->onEndEditing(); //就是这里,onEndEditing又一次给设置内容了,似乎内容没有不论什么的变化

}

return
YES;

}

void
CCEditBoxImplIOS::onEndEditing()

{

m_systemControl.textField.hidden =
YES;

if(strlen(getText()) == 0)

{

m_pLabel->setVisible(false);

m_pLabelPlaceHolder->setVisible(true);

}

else

{

m_pLabel->setVisible(true);

m_pLabelPlaceHolder->setVisible(false);

setInactiveText(getText());

}

}


凝视掉textFieldShouldEndEditing方法。发现画面不再闪烁。 下班以后。。

。。 汗一个。这个问题从事几乎相同2天,再次感谢google,假如还找不到信息。关于疯狂

暂时还没有发现任何问题。我们欢迎评论!

keyboard splitting bug on ipad with ios 5 and 6 (Cocos2d-x)的更多相关文章

  1. iOS手势学习UIGestureRecognizer & cocos2d 手势推荐

    iOS手势学习UIGestureRecognizer & cocos2d 手势推荐 手势识别类型: UILongPressGestureRecognizer  // 长按UIPanGestur ...

  2. [BUG]微信小程序ios时间转换

    描述 小程序ios   new Date('2019-08-14T08:00:00.000+0000')   显示为  <Date: null>. '2019-08-14T08:00:00 ...

  3. iPhone 和 iPad的ios 开发中 利用 WebViewJavascriptBridge组件,通过 UIWebView 对Html进行双向通讯

    本文转载至 http://blog.csdn.net/remote_roamer/article/details/7261490 WebViewJavascriptBridge 项目的 官网 http ...

  4. 移动端上传照片 预览+Draw on Canvas's Demo(解决 iOS 等设备照片旋转 90 度的 bug)

    背景: 本人的一个移动端H5项目,需求如下: 需求一:手机相册选取或拍摄照片后在页面上预览 需求二:然后绘制在canvas画布上 这里,我们先看一个demo(http://jsfiddle.net/q ...

  5. iOS Orientation bug

    Every September means pain for iOS developers- you need to make sure your old apps/code run on the n ...

  6. iOS 之 调试、解决BUG

    iOS 解决一个复杂bug 之 计分卡 iOS 调试 之 打印 iOS 错误之 NSObject .CGFloat iOS bug 之 H5 页面没有弹出提示框 iOS 日志工具 CocoaLumbe ...

  7. 周记3——解决fixed属性在ios软键盘弹出后失效的bug

    这周在做空间(“类似”qq空间)项目.首页是好友发表的说说,可以针对每条说说进行评论,评论框吸附固定在屏幕底部.此时,Bug来了...在ios上,软键盘弹出后fixed属性失效了.后来发现,ios绝大 ...

  8. iOS平台iPhone和iPad免费开放源代码游戏案例列表

    此页面列表收集的是一些iPhone和iPad等iOS操作系统的开放源代码(Open Source)游戏.这些iOS开源游戏都是曾经或正发布在App Store.列表中的这些iOS开源游戏都是使用主流的 ...

  9. 【Openvpn】iOS OpenVPN客户端设置指南(适用iPhone/iPad)

    适用于iPhone/iPad/这些iOS设备.之前iOS使用OpenVPN是需要越狱的,并且是付费第三方应用. 去年开始OpenVPN官方推出了iOS客户端就好用多了,免费也无需越狱. 说明:如果是新 ...

随机推荐

  1. acdream 1211 Reactor Cooling 【边界网络流量 + 输出流量】

    称号:acdream 1211 Reactor Cooling 分类:无汇的有上下界网络流. 题意: 给n个点.及m根pipe,每根pipe用来流躺液体的.单向的.每时每刻每根pipe流进来的物质要等 ...

  2. CoreGraphics QuartzCore CGContextTranslateCTM 说明

    CoreGraphics.h 一些经常使用旋转常量 #define M_E 2.71828182845904523536028747135266250 e 
#define M_LOG2E 1.442 ...

  3. hdu 4296 Buildings(贪婪)

    主题链接:http://acm.hdu.edu.cn/showproblem.php? pid=4296 Buildings Time Limit: 5000/2000 MS (Java/Others ...

  4. android性能测试内存泄漏

    1.什么是内存泄漏?     适用于该系统的内存使用内存泄漏,未回复(释放),该内存可以没有事业,也不能被其他人使用使用自己. 2.出有什么差别?    内存泄漏是分配出去的内存无法回收.    内存 ...

  5. vuejs 相关资料

    官网 http://vuejs.org/ 中文网站 http://cn.vuejs.org/ Vue.js——60分钟快速入门 http://www.cnblogs.com/keepfool/p/56 ...

  6. JAVA Metrics 度量工具使用介绍1

    Java Metric使用介绍1 Metrics是一个给JAVA提供度量工具的包,在JAVA代码中嵌入Metrics代码,可以方便的对业务代码的各个指标进行监控,同一时候,Metrics可以非常好的跟 ...

  7. 【C语言探索之旅】 第二部分第七课:文件读写

    内容简介 1.课程大纲 2.第二部分第七课: 文件读写 3.第二部分第八课预告: 动态分配 课程大纲 我们的课程分为四大部分,每一个部分结束后都会有练习题,并会公布答案.还会带大家用C语言编写三个游戏 ...

  8. 分布式服务框架 dubbo/dubbox 入门示例(转)

    dubbo是一个分布式的服务架构,可直接用于生产环境作为SOA服务框架. 官网首页:http://dubbo.io/ ,官方用户指南 http://dubbo.io/User+Guide-zh.htm ...

  9. POJ 3076 Sudoku DLX精确覆盖

    DLX精确覆盖模具称号..... Sudoku Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 4416   Accepte ...

  10. Swift伟大的编程语言数据采集

    Swift 2048 https://github.com/austinzheng/swift-2048 苹果官方Swift文档<The Swift Programming Language&g ...