GLMageProcessing EAGLView Class Method

I want to show an EAGLView in my ViewController with the above code:

 [((EAGLView*)self.view) drawView]; 

But it crashes with an error like:

 [UIView drawView:]: unrecognized selector sent to instance 

It works great in ViewControlller of GLImageProcessing Sample project provided by Apple.

+4
source share
1 answer

Your viewController does not respond to drawView: because it is of type UIView (which does not implement drawView: .
To get the same behavior as the Apple sample example, you need to make sure that your viewControllers is viewing an if instance of type EAGLView .

Select a view in Interface Builder and set its own EAGLView class:

enter image description here

+2
source

All Articles