Allow click and dragging a view to drag the window itself?

后端 未结 8 1756
醉梦人生
醉梦人生 2020-12-29 06:06

I\'m using a textured window that has a tab bar along the top of it, just below the title bar.

I\'ve used -setContentBorderThickness:forEdge: on the window to make t

8条回答
  •  情歌与酒
    2020-12-29 06:58

    It works for me after TWO steps:

    1. Subclass NSView, override the mouseDownCanMoveWindow to return YES.
    2. Subclass NSWindow, override the isMovableByWindowBackground to return YES.

提交回复
热议问题