Reputation: 153
I used the OpenGL Game template as a starting point for my application and for various reasons I need to have the GLKView that I'm drawing to be a child view of the main view. I tried setting "self.view = glView", where glView is a nested GLKit view and linking that view to the view outlet of the GLKViewController subclass I have but I've had no luck. Can anyone tell me how I would go about making the GLKView that the GLKViewController controls a child view of that View Controller's main view? Thanks in advance
Upvotes: 1
Views: 1154
Reputation: 953
If by child view you mean subview (it makes sense to me) just do :
[myViewController.view addSubview:glView];
(Of course if you're calling it in your view controller just use self.view
).
Upvotes: 1