What Is NSCollectionView?

Discussion in 'Mac Programming' started by Darkroom, Sep 26, 2008.

  1. Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #1
    Apps like iPhoto, where you can drag and drop images into some other window's array grid; is this done using NSCollectionView? :confused:
     
  2. macrumors 6502

    Joined:
    Jul 25, 2006
    #2
    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"
     
  3. thread starter Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #3
    interesting... thanks...

    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?
     

Share This Page