无法实例化名为GLKView的类 [英] Could not instantiate class named GLKView
本文介绍了无法实例化名为GLKView的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了这个例外:
2014-02-19 19:08:34.590 MyApp[42353:70b] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named GLKView'
这是因为我试图以这种方式向我的xib文件添加GL视图:
It is because I tried to add a GL view to my xib file this way:
我想要实现的是在视图下方绘制渐变背景(带有标签'City'的渐变背景)
What I want to achieve is to draw gradient background beneath the View (the one with Label 'City')
这可能是一个常见的例外,因为任何更有经验的iOS开发人员都可以告诉我,我不知道我在做什么。
It is probably a commonly-seen exception because any more experienced iOS developers can tell I have no clue what I am doing.
我的问题:
- 为什么会出现此错误消息?
- 是否可以添加GLKit视图?
- 添加渐变背景的更好方法是什么?
推荐答案
您可能只需要在项目中添加GLKit框架。
You probably simply just need to add the "GLKit" framework to your project.
就像将框架从SDK文件夹拖到项目的框架部分一样简单:
It's as simple as dragging the framework from the SDK folder into the "Frameworks" section of your project:
这篇关于无法实例化名为GLKView的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文