通过透明窗口传递点击 [英] Passing Click Through Transparent Window
本文介绍了通过透明窗口传递点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个全屏透明窗口.当用户点击它时,我希望将点击发送到窗口下方.我该怎么办?
I have a fullscreen transparent window. When the user clicks on it I want the click to be sent to what's underneath the window. How would I do so?
推荐答案
将IgnoresMouseEvents设置为YES应该可以解决问题.
Setting IgnoresMouseEvents to YES should do the trick..
- (void)setIgnoresMouseEvents:(BOOL)ignoreMouseEvents
指定窗口对鼠标单击和其他鼠标事件是否透明,从而允许覆盖窗口.
Specifies whether the window is transparent to mouse clicks and other mouse events, allowing overlay windows.