开发者

How to display NSPanel in front of Fullscreen-View?

开发者 https://www.devze.com 2023-01-29 08:21 出处:网络
My application rund modally in fullscreen, and I need something lik开发者_如何学JAVAe iOS\' UIPopoverController. The first idea was using an NSPanel, but I can\'t get it to show in front of the fullsc

My application rund modally in fullscreen, and I need something lik开发者_如何学JAVAe 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?


Sorry, none of them really worked.

The solution was:

[yourPanel setLevel:kCGMaximumWindowLevel];

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


Try this instead:

[yourPanel setLevel:NSMainMenuWindowLevel+1];

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


Something like

[yourPanel setLevel:[fullscreenWindow level] + 1];

should work.

0

精彩评论

暂无评论...
验证码 换一张
取 消