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. bat脚本命令

    注:本文转载地址 http://www.cnblogs.com/yefengmeander/archive/2011/12/01/2887978.html 1.Echo 命令  打开回显或关闭请求回显 ...

  2. Linux下PS命令详解 (转)

    要对系统中进程进行监测控制,查看状态,内存,CPU的使用情况,使用命令:/bin/ps (1)ps :是显示瞬间进程的状态,并不动态连续: (2)top:如果想对进程运行时间监控,应该用 top 命令 ...

  3. MVC 检测用户是否登录

         当我们访问一个网站的需求检測用户是否已经登录(通过Session是否为null),我们知道在WebForm中能够定义一个BasePage类让他继承System.Web.UI.Page,重写它 ...

  4. Eclipse——热键&amp;Help

    版权声明:本文博主原创文章.博客,未经同意不得转载.

  5. 每天努力一点之SQL

    今天工作当中遇到一个问题:统计信息并导出EXcel 报表. 刚开始只做了统计信息: 如下图 请看最后一列的数据. 我当时想都从数据库里取出来,但是由于我能力有限没有做出来.先贴下后来写的SQL 语句. ...

  6. App设计相关网站

    http://sketch.im/ 设计素材 principle  动效软件 http://principleformac.com/ 官网 http://principlecn.com/ 中文网

  7. Visual Studio 2012中使用Zen Coding,写html的神器!

    点工具 -扩展和更新的联机库中 找到以下俩插件 安装后重新启动 新建一个html文件.将下行代码拷贝到页面里. div>(header>div)+(section>ul>li. ...

  8. 用正交多项式作最小二乘拟合的java实现(转)

    import java.util.Scanner; public class Least_square_fit { public static double Least_square_method(i ...

  9. uva 10831 - Gerg&#39;s Cake(勒让德符号)

    题目链接:uva 10831 - Gerg's Cake 题目大意:给定a和p.p为素数,问说是否存在x,使得x2≡a%p 解题思路:勒让德记号,推断ap−12≡1%p #include <cs ...

  10. C++学习笔记1--基础知识

    #include <iomanip> setpresition(int n); 设置输出精度浮点数是n. [goto声明] goto也被称为无条件分支语句购买勇于改变运行顺序的声明.got ...