1、创建NSWindowController prefereces.h .m .xil文件
2、如果xil没有一起创建,点住xil文件,右键file's owner,
outlets - window
preferencing outlets - delegate
都拖到window上面
2、点击xil中的window,把NSWindow改为NSPannel,style改为HUD panel.
3、
prefereces* wnd = [[prefereces alloc]initWithWindowNibName:@"prefereces"];
wnd.contentViewController.view.hidden = NO;
[wnd showWindow:self];
4、如果是arc代码,wnd会被立即释放,表现为wnd一闪后消失