Hi is there a way to change the window level with SwiftUI so I can make a floating window for my mac app? I am using the SwiftUI life cycle
Hi is there a way to change the window level with SwiftUI so I can make a floating window for my mac app? I am using the SwiftUI life cycle
You can access your windows with NSApplication.shared.windows and set the level for each one.
For instance:
Button("Float windows") {
for window in NSApplication.shared.windows {
window.level = .floating
}
}