Search code examples
cocoaresizenswindowresizegrip

How to write an own resize corner/handle for an NSWindow?


How can I write an own resize corner/handle for an NSWindow? I'm using a subclass of an NSWindow without the default resize corner, but I need it for my window.

alt text


Solution

  • The basic outline:

    • Create a view.
    • Put some "drag me" indicator appropriate to your window in the view.
    • Have the view's drag action method respond by resizing the window so that the corner in question is now located at the current mouse position.