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. [C++] WinAES问题

    WinAES这是一个很好windows CAPI包. 假设C++项目需求和java程序aes加密和通信的解密,然后WinAES代码是有问题. java的aes默认代码未设置IV和用途ECB模式. 因此 ...

  2. NLB+Application Request Route 网路负载均衡

    NLB网路负载均衡管理器详解   序言 在上一篇配置iis负载均衡中我们使用啦微软的ARR,我在那篇文章也中提到了网站的高可用性,但是ARR只能做请求入口的消息分发服务,这样如果我们的消息分发服务器给 ...

  3. Apache与Tomcat整合(转)

    一 Apache与Tomcat比较联系 apache支持静态页,tomcat支持动态的,比如servlet等. 一般使用apache+tomcat的话,apache只是作为一个转发,对jsp的处理是由 ...

  4. java提高篇(十一)-----代码块

    在编程过程中我们可能会遇到如下这种形式的程序: public class Test { { //// } } 这种形式的程序段我们将其称之为代码块,所谓代码块就是用大括号({})将多行代码封装在一起, ...

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

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

  6. 为应用程序池 'DefaultAppPool' 提供服务的进程关闭时间超过了限制

    服务器经常产生“应用程序池 'DefaultAppPool' 提供服务的进程关闭时间超过了限制.进程 ID 是 '2068'.”的错误,导致iis处于假死状态,经了解是IIS应用程序池的设置问题.解决 ...

  7. UVA 1291 Dance Dance Revolution(DP)

    意甲冠军:跳舞机有一个上5积分,分别central, top, bottom, left, right分,区区足站立还是需要1点物理,从一个单纯的脚central点上须要2点体力,从一个点上移动到相邻 ...

  8. [原创].NET 业务框架开发实战之六 DAL的重构

    原文:[原创].NET 业务框架开发实战之六 DAL的重构 .NET 业务框架开发实战之六 DAL的重构 前言:其实这个系列还是之前的".NET 分布式架构开发实战 ",之所以改了 ...

  9. hdu 3652 B-number(数字dp)

    http://acm.hdu.edu.cn/showproblem.php? pid=3652 大致题意:"B-number"即一个整数含有子串"13"且被13 ...

  10. Mobile Services 提交批量数据

    Mobile Services批量提交数据,參考了文章:Inserting multiple items at once in Azure Mobile Services.里面事实上已经介绍得比較清楚 ...