View Full Version : What Is NSCollectionView?
Sep 26, 2008, 07:56 PM
Apps like iPhoto, where you can drag and drop images into some other window's array grid; is this done using NSCollectionView? :confused:
Sep 26, 2008, 09:19 PM
I don't think iPhoto uses NSCollectionView... NSCollectionView is new to Leopard and iPhoto's had its photo viewer for much longer.
However, they work similarly, in that they display a sort of grid view. You provide NSCollectionView a prototype view, and when you hook up appropriate bindings, it will manage copies of that prototype view for each represented object in its content array and display them in the grid. It will also do some automatic animations for you as you add/remove/rearrange items.
There's some good examples of how to use it on developer.apple.com. Look for "IconCollection" and "SourceView"
Sep 26, 2008, 11:31 PM
strange that elements of "sourceView" would make Finder much nicer and that apple hasn't implemented the animations into Finder...
so i guess just having a window to drag and drop files onto, and have them line up would require NSMatrix? NSTableView?