Failed to instantiate GLKView class

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'

This is because I tried to add a GL image to my xib file as follows:

enter image description here

What I want to achieve is to draw a gradient background under the view (the one with the City label)

This is probably a widespread exception because more and more experienced iOS developers may say that I don’t know what I'm doing.

My questions:

  • Why is this error message?
  • Can I add a GLKit View?
  • What is the best way to add a gradient background?
+3
source share
3 answers

You may just need to add the "GLKit" structure to your project.

It is as simple as dragging and dropping the framework from the SDK folder into the "Frames" section of your project:

Drag GLKit

+9

GLKit Framework .

+2

,

  • " ", .. .
  • TARGETS " ".
  • .
  • .
  • " +" .
  • GLKit.framework Add.

Note: if you added any wrong structure, just click on this framework and click on the "-"

+1
source

All Articles