就像在 NSWindow 中单击按钮后显示的 NSPanel 一样。
我查了很多,但没有简单的例子。
谢谢你的帮助。
可以这样做:
-(IBAction)showButtonAction:(id)sender {
[[NSApplication sharedApplication] beginSheet:panelOutlet
modalForWindow:self.window
modalDelegate:self
didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
contextInfo:nil];
}
注意力:
不要忘记取消选中NSPanel
's 启动时可见复选框中属性检查器 and 关闭时释放如果您不会使用此面板一次。
Result:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)