stopModal()
Stops a modal event loop.
Declaration
func stopModal()Discussion
This method should always be paired with a previous invocation of runModal(for:) or beginModalSession(for:). When runModal(for:) is stopped with this method, it returns NSModalResponseStop. In macOS 10.9 and later, you can use this method to stop a runModal(for:) loop outside of an event callback, such as from within a method repeatedly invoked by an Timer object or a method running in a different thread.