开发者

Cocoa topmost window

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜