If you want to track the movement of NSWindow live, this is not possible by default. Youll have to do it yourself. You can be notified when NSWindow starts to drag (move) using NSWindowWillMoveNotification or end the drag (move) - NSWindowDidMoveNotification .
Take a look at these examples, they will help you solve the problem of moving in real time:
1. Example:
Description: A very short category in NSWindow that makes Windows Post NSWindowDidMove notify continuously during drag and drop (just like NSWindowDidResizeNotification behaves). Uses a secondary stream and behavior can be switched.
Download link .
2. Example:
Link to download the project .
source share