The code you shared is probably inside the implementation file of one of your UIViewController
's which I'm sure has an associated .xib or lies somewhere inside a storyboard.
Now take that UIViewController
, select the root view (the white background of the view controller) and change its class from UIView
to GPUImageView
as shown here.