Here is an example of creating and presenting a custom dialog in a macOS extension using Swift:
main.swift575 chars21 lines
This creates a CustomDialog
class with a show()
method that presents the dialog as a modal NSAlert
. You can customize the title, message, and button titles by passing them into the init
method. To use the dialog, simply create an instance and call the show()
method.
gistlibby LogSnag