How do stop panels from becomming key window on launch?
I have a x开发者_如何学Cib file with a main window and a panel. On awakeFromNib I try to orderFront the main window, but the panel keeps being key window.
- (void)awakeFromNib {
[inspectionPanelOutlet orderBack:self];
[inspectionPanelOutlet orderWindow:NSWindowBelow relativeTo:0];
[window makeKeyAndOrderFront:self];
}
This code has no effect.
Are you sure awakeFromNib is called (add an NSLog message and see if it fires)? If it is called you might want to try:
[self makeMainWindow];
or
[self makeKeyWindow];
精彩评论