开发者

Cocoa topmost window

开发者 https://www.devze.com 2023-02-19 16:47 出处:网络
How could I get one of my Cocoa application windows开发者_StackOverflow中文版 to get (and maintain) on top all desktop windows while my apllication stay running?Have a look at NSWindow\'s -setLevel: m

How could I get one of my Cocoa application windows开发者_StackOverflow中文版 to get (and maintain) on top all desktop windows while my apllication stay running?


Have a look at NSWindow's -setLevel: method:

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWindow/setLevel:


You have to make the window key and order it to front. Use this

[[myWindowController window] makeKeyAndOrderFront:self];
0

精彩评论

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