本文介绍了如何关闭applicationWillResignActive中的OpenGL任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了我的第一个应用程式。在设备上进行测试时,我按下主屏幕按钮时出现崩溃,并显示错误消息

I have nearly completed my first app. In testing on the device, I am getting a crash when I press the home button, with the error message

libGPUSupportMercury.dylib`gpus_ReturnNotPermittedKillClient:

libGPUSupportMercury.dylib`gpus_ReturnNotPermittedKillClient:

根据这些帖子:

http://stackoverflow.com/questions/10620287/opengl-es-crash-on-move-background-ios- 5-1

Based on these posts:http://stackoverflow.com/search?q=how+to+shut+down+OpenGLhttp://stackoverflow.com/questions/10620287/opengl-es-crash-on-move-background-ios-5-1

我很确定问题是我的应用程序是一个软件的扩展,它使用一些涉及OpenGL的示例代码(我对此很少有所了解)在resignActive上OpenGL任务没有正常关闭。

I am pretty sure the problem is that my app is an extension of software that uses some sample code involving OpenGL (about which I have very little understanding) and that the OpenGL tasks are not shutting down properly on resignActive.

我在我的AppDelegate中没有运气:

I tried the following in my AppDelegate with no luck:

- (void)applicationWillResignActive:(UIApplication *)application {
    glFinish();
}

我的应用程序退出时不需要保存任何设置...需要结束。
任何人都可以建议一个解决方案?

My app does not need to save any settings upon exit... it just needs to end.Can anyone suggest a solution?

推荐答案

要在用户push home按钮完成程序吗?
在Xcode上,选择目标并选择信息选项卡。
自定义iOS目标属性,添加一个名为

To finish program at user push home button ?on Xcode, choice Target and select Info tab.Custom iOS Target Properties, add a Key named

应用程序不在后台运行

设置值

尝试一下!

ps不必写glFinish()。

p.s. Not necessary write glFinish().

这篇关于如何关闭applicationWillResignActive中的OpenGL任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 05:17