Bringing an application window to the front Swift

There are many ways to do this, however this simple method below has worked for me better than window?.makeKeyAndOrderFront(self)

override func viewDidAppear() {
  super.viewDidAppear()
  NSApp.activate(ignoringOtherApps: true)
}

Leave a Reply

Your email address will not be published. Required fields are marked *


*