Mixing Juce and Mac Native UI?

Hello,

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,

thanks

asr

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…

http://cocoaconvert.net/2009/05/24/flippin-modal-panels/

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();
jassert(componentPeer);
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)
-(void)flipMe
{
 // code to flip the window
}

@end

Hey, thank you :slight_smile: