Reputation: 15808
Most Cocoa apps come with a "About App" menu item. This opens an dialog that often is not custom but instead provided. It shows the icon and some information from the application bundle.
I cannot seem to find any information/documentation on how to open this dialog in code.
I have an app written in swift that does not use xib/storyboards so there is no default "About" menu item. While writing a custom one isn't exactly hard I am still wondering how to just open the standard one.
Any pointers to documentation or code snippets? I failed to find any.
Upvotes: 1
Views: 309
Reputation: 285220
Call orderFrontStandardAboutPanel(_:)
on the application instance
NSApp.orderFrontStandardAboutPanel(nil)
Upvotes: 4