简体   繁体   中英

showing the default about dialog

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.

在应用程序实例上调用orderFrontStandardAboutPanel(_:)

NSApp.orderFrontStandardAboutPanel(nil)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM