From 4103f272bd6fa2a38c5e38020df2f93ea546f6e3 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Mon, 23 Aug 2021 00:47:17 -0300 Subject: [PATCH] Close Application when last window is closed --- CameraController/AppDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CameraController/AppDelegate.swift b/CameraController/AppDelegate.swift index 51564b5..a4f302c 100644 --- a/CameraController/AppDelegate.swift +++ b/CameraController/AppDelegate.swift @@ -119,4 +119,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { // If we got here, it is time to quit. return .terminateNow } + + func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } }