Reputation: 16317
I am writing an application that sits in the OS X menu bar and when you press its icon a little NSPanel opens up. I would like the user to be able to resize it, but only by dragging the bottom left corner. I want to prevent them from being able to drag the top edge down and "unstick" the window from the menu bar.
Upvotes: 1
Views: 503
Reputation: 80265
Just override touchesBegan
mouseDown:
and pass on the drag only if it is in the designated corner, discarding other touches.
See Cocoa Event Handling Guide
Upvotes: 1