Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not instantiate class named GLKView

Tags:

ios

ios7

xcode5

I got this exception:

2014-02-19 19:08:34.590 MyApp[42353:70b] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named GLKView'

It is because I tried to add a GL view to my xib file this way:

enter image description here

What I want to achieve is to draw gradient background beneath the View (the one with Label 'City')

It is probably a commonly-seen exception because any more experienced iOS developers can tell I have no clue what I am doing.

My Questions:

  1. Why this error message?
  2. Is it possible to add a GLKit View?
  3. What is a better way to add gradient background?
like image 598
Anthony Kong Avatar asked Jan 23 '26 22:01

Anthony Kong


2 Answers

You probably simply just need to add the "GLKit" framework to your project.

It's as simple as dragging the framework from the SDK folder into the "Frameworks" section of your project:

Drag GLKit

like image 85
Michael Dautermann Avatar answered Jan 25 '26 12:01

Michael Dautermann


You need to add the GLKit Framework to your project.

like image 22
jervine10 Avatar answered Jan 25 '26 13:01

jervine10



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!