Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tonyw

macrumors newbie
Original poster
May 13, 2009
7
0
york, uk
hi,

been playing about with open gl es project, as created by xcode New Project... now confused! From the program code, if I add simple components, such as UILabel, to the EAGLView *glView object via addSubview, then they do not appear. However, booting into the Interface Builder and double clicking the Window object brings up a view of type EAGLView. Dragging a UILable onto this results in the label appearing atop of the GL window at runtime.

I'm wondering how to do the equivalent of Interface Builder drag n drop programatically? I thought I had it, but evidently not!

any thoughts?

thanks
tony
 

xsmasher

macrumors regular
Jul 18, 2008
140
0
I wonder if adding the objects in UIBuilder is making them subviews of the window, not the EAGLView? The draw methods for the EAGLView might lack the [super drawView] or [super drawRect:] calls that would caused subviews to be drawn.

EITHER WAY, the docs warn you not to put UIviews on top of an EAGLView - performance goes into the crapper.
 

tonyw

macrumors newbie
Original poster
May 13, 2009
7
0
york, uk
thanks xsmasher - good points. Presumably, it's perfectly reasonable to add UIViewControllers to the window after releasing the EAGLView and generally switch between the two as required?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.