开发者

Prevent an instance of NSView from receiving mouse events

I have an NSView in a window with core animation layer turned on. I use this view to display images with animation from time to time. I need t开发者_StackOverflow社区he entire view to be the back layer not only the images. Behind this view which I call AnimationBaseView are other views which the user interacts to.

Everything is ok except the AnimationBaseView prevents the other views from getting rightMouseDown events.

I've tried the following:

  • returning NO to acceptsFirstResponder to AnimationBaseView
  • Hiding and unhiding the AnimationBaseView as needed, but produces a nasty flicker.

Thank you for your help, Jose.


Override - (NSView *)hitTest:(NSPoint)aPoint to return either nil or the view that should handle the mouse events

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜