Programmatically defined view in interface builder

谁都会走 提交于 2019-12-25 03:46:09

问题


I have created an OpenGL ES 2.0 view that takes up the iPad's whole screen and I am rendering some things to it.

now I want to resize the view to make it smaller and then add some components to control the content of the opengl view. this view is completely defined programmatically but my goal, because I want to add in some controls, is to use interface builder.

how do I import this OpenGLView into interface builder?


回答1:


I've figured out how to do it. You simply create a UIView in IB and then set the UIView's class identity to your sub-class of UIView that will draw with OpenGL.



来源:https://stackoverflow.com/questions/6763577/programmatically-defined-view-in-interface-builder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!