Juce components and cocoa touch UI classes

Easy question. I’ve done a ton of JUCE programming at this point, but less iPhone stuff. I’ve made a few iPhone apps with JUCE, but now I’ve gotten around to checking out the interface builder and iphones custom UI classes, and I’m wondering how/if I can get the two to work together.

Is there a proper way to cast a juce Component as an NSObject object, and embed it directly into a xib file?

Or perhaps as an openGL component of some sort?

Certainly this wouldn’t work with rotation and the other custom iPhone functions?

Are there any problems with including juce non-UI elements into iphone projects that use the Cocoa touch classes? How would I set up messaging between a juce audioProcessor or other juce element, and a non-Juce UI ?

Anyway, I’m sure I can find the limitations myself with a little experimenting, but thought it would be a good question to post here.

Aha !

Step one: Cocoa UI + Juce audio/etc.

Very nice.

But of course, still no love in placing a juce component into a Cocoa touch UI. I’m guessing there might be some way to cast a juce component as a NSObject of some sort and add it as a custom UI object, but I’m kinda new to the Cocoa UI an interface builder.

If you use Component::addToDesktop, you can pass it a native window handle to add it to - in this case, you’d give it an NSView object.