显示地图时,iOS 6 应用程序在 EAGLContext 中崩溃 [英] iOS 6 app crashes in EAGLContext when displaying maps

查看:19
本文介绍了显示地图时,iOS 6 应用程序在 EAGLContext 中崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用 OpenGL 和 MKMapView 的应用程序.当我们切换到 iOS 6 时,每当我们在设置自己的 EAGLContext 后尝试显示地图时,它就会在 [EAGLContext setCurrentContext:] 处开始崩溃,并带有 EXC_BAD_ACCESS.

We have an app that uses OpenGL and MKMapView. When we switched to iOS 6 it started crashing at [EAGLContext setCurrentContext:] with EXC_BAD_ACCESS whenever we tried to display a map after setting our own EAGLContext.

推荐答案

iOS 6 地图是基于 OpenGL 的.如果你不打电话,你的应用会崩溃

iOS 6 maps are OpenGL based. Your app will crash if you don't call

[EAGLContext setCurrentContext:nil]

在您设置了自己的 EAGLContext 之后.我们通过将上述调用放入与 EAGLContext 交互的类的 dealloc 方法来修复我们的错误.

after you have set your own EAGLContext. We fixed our bug by putting the above call into the dealloc method of our class that was interacting with EAGLContext.

这篇关于显示地图时,iOS 6 应用程序在 EAGLContext 中崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆