Automatically arranging thumbnails in a view.

Discussion in 'Mac Programming' started by wyattbiker, Sep 8, 2012.

  1. wyattbiker macrumors member

    Joined:
    Mar 7, 2009
    #1
    I want to display a bunch of same size images (such as thumbnails) in rows using a view, left to right and down. When the user resizes the view, I would like to rearrange the images so they are viewable in the larger/smaller view and scroll down if necessary.

    I was looking to use NSScrollView and NSCollectionView. Do I need to specifically position each image in the view (ie calculate frame offsets) or is there an easier way to do this?

    Am i using the right classes or is there another class I should be looking at. I would like this to work on Leopard or better although I am using Mountain Lion for coding.

    Any sample code or links would be appreciated.

    Thanks :)
     
  2. wyattbiker thread starter macrumors member

    Joined:
    Mar 7, 2009
  3. knightlie macrumors 6502a

    Joined:
    Feb 18, 2008
    #3
    Look into ImageKit - you want IKImageView. It's a bit tricky to get working, but there are wrapper objects on the web which work quite well.
     
  4. wyattbiker thread starter macrumors member

    Joined:
    Mar 7, 2009
    #4
    It may do the job. Will have to try it. Thanks
     

Share This Page