开发者

Opening About (App Name) with a button (Mac os x)

开发者 https://www.devze.com 2023-03-31 02:59 出处:网络
I 开发者_C百科was wondering if it would be possible to have a button inside of my mac app and when you click on it, it will open the About (App Name) window?

I 开发者_C百科was wondering if it would be possible to have a button inside of my mac app and when you click on it, it will open the About (App Name) window?

Hope it makes sense! :)


Connect the NSButton to File's Owner and select orderFrontStandardAboutPanel: like this:

Opening About (App Name) with a button (Mac os x)

EDIT

Alternatively connect the NSButton directly to the following IBAction:

- (IBAction)theButton:(id)sender {

    [NSApp orderFrontStandardAboutPanel:self];

 }
0

精彩评论

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