Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display NSPanel in front of Fullscreen-View?

My application rund modally in fullscreen, and I need something like iOS' UIPopoverController. The first idea was using an NSPanel, but I can't get it to show in front of the fullscreen view.

I need either a UIPopoverController-like class for Cocoa or a way to display a NSPanel in front of a fullscreen view. How can I accomplish this?

like image 988
jsadfeew Avatar asked Oct 31 '25 02:10

jsadfeew


2 Answers

Sorry, none of them really worked.

The solution was:

[yourPanel setLevel:kCGMaximumWindowLevel];

However, Wevah and SphereCat1 helped me find the setLevel: method. Thanks.

like image 104
jsadfeew Avatar answered Nov 02 '25 22:11

jsadfeew


Try this instead:

[yourPanel setLevel:NSMainMenuWindowLevel+1];

That should put it above everything on the screen. Happy Coding!
Billy

like image 42
vilhalmer Avatar answered Nov 02 '25 22:11

vilhalmer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!