Reputation: 562
I want to show the EAGLView
in my ViewController
with the above code:
[((EAGLView*)self.view) drawView];
But it crashes with the error as;
[UIView drawView:]: unrecognized selector sent to instance
it works fine in the ViewControlller
of GLImageProcessing
Sample project Provided by Apple.
Upvotes: 4
Views: 118
Reputation: 34243
Your viewController's view does not respond to drawView:
as it is of type UIView
(which doesn't implement drawView:
).
To get the same behavior as in Apple's sample code, you have to make sure that your viewControllers view instance if of type EAGLView
.
Select the view in Interface Builder and set it's custom class to EAGLView
:
Upvotes: 2