Posts RSS Comments RSS 104 Posts and 72 Comments till now

Cover-Flowize Your Application

People on the cocoa-dev mailing list talked about the cover flow API, which does exist, albeit not in public. If you know how to use IKImageBrwoserView, you already know how to cover-flowize your application.

In your Interface Builder project, drop in a custom view and make its class IKImageFlowView. In the data source class (which has the same form as IKImageBrowserDataSource), implement these two required methods:

  • - (NSUInteger)numberOfItemsInImageFlow:(id)aFlowLayer
  • - (id)imageFlow:(id)aFlowLayer itemAtIndex:(int)index

And there you have it:

Cover Flow Study

I showed that in yesterday’s CocoaHeads Taipei meet-up. The sample code is available here.

As this is an undocumented class, so caveat programmor. It may change in the next version’s OS X or simply be snapped away under your nose.

3 Responses to “Cover-Flowize Your Application”

  1. on 12 Nov 2007 at 5:50 pmtransient proofreader

    IKImageBrwoserView → IKImageBrowserView

  2. on 10 Feb 2008 at 6:39 amDaniel

    Hi.
    Indeed this works easily - my DVDs images are now viewed with cover flow :)
    Any idea about delegate methods and/or available bindings (exposedBindings only gives hiden and tooltip :(…)?
    specifically being notified of selection change…

    thanks
    Daniel

  3. on 10 Feb 2008 at 7:53 amDaniel

    “selectedIndex” is an observable value which does that

Trackback this post | Feed on Comments to this post

Leave a Reply