If you add something to the xib file in an xcode project, you can in fact make them generate little snippets in your code for things like event handlers.
what isn’t generate however is some code that actually creates the object, assigns it to a viewport, initialises it etc. My question is, where is this code? is it hidden in the xib file?
and also, if I wanted to do all this myself programatically, what would it look like and where would i put it, for example in the open gl template xcode comes with?
I don’t know where the code is but it’s abstracted so you don’t have to deal with it. You would put it in a ViewController file if you were to do it in code.
You would need something like;
The following link explains how to deal with views in code.
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingViews/CreatingViews.html