A utility class for displaying Xcode-like notifications, aka bezel notifications. It currently only supports displaying a given text that will be centered on screen, will remain on screen for the specified amount of time, then fade out.
It is based on Core Animation and NSVisualEffectView, all written in Swift 5. It requires macOS 10.14 or later. UI is written in code only to be able to distribute this as a Swift package.
Just add this repo in your dependencies.
let bezel = BezelNotification(text: "This is a sample message.") bezel.runModal() // or bezel.show()
let bezel = BezelNotification(visibleTime: 3.0) bezel.text = "Hello!" bezel.show()