I'm setting up a class to view video using Google VR. It runs without error using the sample code. When I copy the class and view controller over to my project, this error occurs:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setDelegate:]: unrecognized selector sent to instance 0x109d04d90'
Here's the relevant code:
@interface VideoPlayerViewController () <GVRVideoViewDelegate>
@property(nonatomic) IBOutlet GVRVideoView *videoView;
@property(nonatomic) IBOutlet UITextView *attributionTextView;
@end
_videoView.delegate = self;
_videoView.enableFullscreenButton = YES;
_videoView.enableCardboardButton = YES;
_videoView.enableTouchTracking = YES;
I can't figure out why it works in the sample code and not my project. It's the exact same code and everything is connected up in the storyboard. The UIView is a custom class of type GVRVideoView.
This is driving me crazy. Time sensitive. Please help!