iOS GLKViewController 嵌套 GLKit 视图
我使用 OpenGL 游戏模板作为应用程序的起点,由于各种原因,我需要将正在绘制的 GLKView 作为主视图的子视图。我尝试设置“self.view = glView”,其中 glView 是一个嵌套的 GLKit 视图,并将该视图链接到我拥有的 GLKViewController 子类的视图出口,但我没有运气。谁能告诉我如何制作 GLKViewController 控制该视图控制器主视图的子视图?提前致谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果子视图你指的是子视图(这对我来说很有意义),只需这样做:(
当然,如果你在视图控制器中调用它,只需使用 self.view )。
If by child view you mean subview (it makes sense to me) just do :
(Of course if you're calling it in your view controller just use
self.view
).