I’ve just uploaded some Cocoa source code showing how to make NSWindows ‘snap’ to other windows and to the edges of the screen. You can configure what edges a window will snap to and the threshold distance of the snapping. I hope someone finds it useful. Comments welcome.
Code is now on the toxicsoftware subversion server: http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Projects/Misc/SnappingWindows/
![]()