Juce components and cocoa touch UI classes


#1

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.


#2

Aha !

Step one: Cocoa UI + Juce audio/etc.
http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=5326

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.


#3

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.