Loading...

How to ignore mouse events in a view or window in macOS?

question macOS swift
Ram Patra Published on March 14, 2021

You can ignore mouse events in a window/view by adding just a single line of code.

window.ignoresMouseEvents = true

Or,

view.ignoresMouseEvents = true
Ram Patra Published on March 14, 2021
Image placeholder

Keep reading

If this article was helpful, others might be too

question macOS swift August 6, 2020 How to open an app's window on top of all others in Swift?

You can open your app’s window on top of all other open application windows with the below code:

question presentify macOS August 6, 2020 How to annotate or draw in JioMeet?

Reliance Jio has done a commendable job releasing a video conferencing app in a short time frame, however, it received criticisms that it copied pixel by pixel from Zoom. I actually agree with some of the criticisms but that’s for another blog post.

question macOS swift August 6, 2020 How to keep an app's window always on top of others in Swift?

Before launching the window, just use the appropriate window level, and you’re done.