Skip to content

Commit

Permalink
terminate after last window closed
Browse files Browse the repository at this point in the history
  • Loading branch information
WilhelmOks committed Dec 30, 2020
1 parent 9414cd1 commit d39cf7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AppetizerApp/Appetizer/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import SwiftUI

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {

var window: NSWindow!


func applicationDidFinishLaunching(_ aNotification: Notification) {
// Create the SwiftUI view that provides the window contents.
let userData = UserData()
Expand All @@ -35,6 +33,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
// Insert code here to tear down your application
}


func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}
}

0 comments on commit d39cf7d

Please sign in to comment.