Display Unobstrusive message on macOS using Swift

Viewed 65

I need to display a text message on screen.

Currently I am doing this with a Text view on a transparent window, so the text is overlayed on the screen, perfectly.

The issue is that if am working on a text editor, or Excel, the popup shows up it blocks the text editor by an invisible rectangle around the text, i am unable to send mouse clicks or text keys to the window that i was working on.

I know there are ways to do it, some applications already do it, I just need to know how.

1 Answers

Take a look at this question. It is in Objective-C but the API details you need are there, you just need to do the equivalent in Swift. Whereas that answer draws a transparent red border you will draw your text transparent.

Related