0

I'm new to view controllers with OpenGL, but I want to present a view controller with two child view controllers (the user only sees the two child view controllers) which both display some graphics using OpenGL.

I have no idea why what I'm doing is not working. This is hard to describe in code, as there really isn't any, but I've got a Storyboard where I have my initial UIViewController, two container views each taking up half the vertical space, which then point to each of their UIViewControllers that have a GLKView making up the main view.

I don't even have any code yet, but whenever I run it, the app opens and then immediately crashes stating:

* Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named GLKView'

Here's a sample project where it's failing: http://speedyshare.com/v8YCy/download/GLTest.zip

How do I accomplish OpenGL-based view controllers as child view controllers?

genpfault
  • 51,148
  • 11
  • 85
  • 139

1 Answers1

0

I didn't download your project, but the problem is almost certainly that you didn't add the GLKit framework to your project. Go to your project's settings (the blue icon at the top of the project navigator) and scroll to the bottom ("Linked Frameworks and Libraries"), and click the "+" button. You can add the framework from there.

Ben Pious
  • 4,765
  • 2
  • 22
  • 34