Simple image viewer on Mac OS X

Edit: The image view now has a dedicated page, and also is available in binary format (you can just drop in your Application’s folder, no need to recompile ^^) The page is : http://blog.pcitron.fr/tools/macosx-imageviewer/

I’ve been learning Objective-C and Cocoa development since a few months now, and after I had followed a few tutorials, I decided to start a little image viewer project : it’s fun to do, and cover a lot of interesting areas of Cocoa programming.

Now I think I’ve reached the first usable version of the software, and I thought I might release it. It’s really really simple. It allows you to browse through your computer, the images contained in a browser are shown as thumbnails, and when clicking on them, you have a bigger preview. If you double click a thumbnail (or press Enter when one is selected) you enter a fullscreen mode. That’s all (the menu options are not implemented yet)

But the source code might interest a few beginners since it covers a few points I found hard to learn :

  • custom cells in the NSOutlineView (it allows to display the folder icons next to the name)
  • use of the user defaults to remember the size and position of the window between each run, and save other stuff
  • programmatically bind the background color of an IKImageBrowserView to the user defaults
  • how to use the fullscreen mode of an NSView

Bellow is a screenshot of the application, and here is the link to the XCode sources : ImageViewer v0.1

2 thoughts on “Simple image viewer on Mac OS X

  1. Hi, im really interest in this software but i cant install in my imac version 10.6.8
    Can you help me, please?

    Thanks!! :)

    1. Hy,
      Unfortunately (as it’s written in the About section of the viewer’s page : http://blog.pcitron.fr/tools/macosx-imageviewer/) this tool only works with OSX 10.7 and higher. And I currently don’t have the time (nor the will) to make it work on 10.6 or less. One of the comenters (on the page I linked) did it though, but he didn’t leave his email, so I can’t even ask if he willing to share the result, sorry :s

Leave a Reply to Citron Cancel reply

Your email address will not be published. Required fields are marked *