Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open About App window programmatically on macOS

On Mac OS X, every app has an "About" window, which can be opened by clicking About [appname] in the [appname] menu in the menu bar.

I'd like to open this window programmatically. Is this possible?

EG: The About button for iTunes:

iTunes About Menu Item

like image 514
lukas Avatar asked Oct 17 '25 04:10

lukas


1 Answers

The About menu item is connected to the orderFrontStandardAboutPanel method of NSApplication, you can call it programmatically with

[NSApp orderFrontStandardAboutPanel:self]; // or nil as parameter

or in Swift

NSApp.orderFrontStandardAboutPanel(self) // or nil as parameter
like image 136
vadian Avatar answered Oct 20 '25 23:10

vadian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!