Mixing Juce and Mac Native UI?


Is possible to use some UI effect and component from Cocoa or any native Mac api ?

This is a very global answer, o.c.

I was wndering if to make some flip effect as on the iphone, it is better to code your own ni Juce, or if importing from mac api is possible, e.g,



You might be able to apply something to the whole NSWindow, but I don’t really know how that stuff works.

A mac-centric way…


Something like this in your component .mm (or in xcode get info on the source file and force objective c++ compilation)

NSWindow *w;
ComponentPeer *componentPeer=getPeer();
NSView* const peer = (NSView*) (componentPeer->getNativeHandle());
if (peer && (w=[peer window]))
 [w flipMe]; // I dunno if the above link extends NSWindow via a category...see below

// example of extending NSWindow
@implementation NSWindow(WindowFlipperExt)
 // code to flip the window


Hey, thank you :slight_smile: