问题
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