I started using the Xcode template with GLKit, but I would like to have a window showing part of the OpenGL view and UIKit for the controls.
GLKViewController comes with GLKView. I went to IB and removed GLKView and added UIView, putting the new GLKView on top of the size I want. Then I fixed the GLKView links (self.view) and set the smaller GLKView delegate to the view controller.
I got
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[GLKViewController loadView] loaded the "2-view-9XZ-07-hga" nib but didn't get a GLKView.'
Then I looked through the docs and found that GLKViewController requires GLKView as its view. Not surprising. Yes, I'm new to this.
What a good way to use GLKit with GLKView smaller than full screen? Or is the mix of UIKit and GLKit simply not done?
(update: many people find this question, Duncan's answer, using view controller containment, worked well.)
Adam eberbach
source share