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

后端 未结 8 1746
醉梦人生
醉梦人生 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:46

    I tried the mouseDownCanMoveWindow solution (https://stackoverflow.com/a/4564146/901641) but it didn't work for me. I got rid of that method and instead added this to my window subclass:

    - (BOOL)isMovableByWindowBackground {
        return YES;
    }
    

    which worked like a charm.

提交回复
热议问题