Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道我的mac应用程序中是否可以有一个按钮,当你点击它时,它会打开关于(应用程序名称)窗口?
希望这是有道理的!:)
连接NSButton到File's Owner并orderFrontStandardAboutPanel:像这样选择:
NSButton
File's Owner
orderFrontStandardAboutPanel:
编辑
或者NSButton直接连接到以下IBAction:
IBAction
- (IBAction)theButton:(id)sender { [NSApp orderFrontStandardAboutPanel:self]; }