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:
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.
lukhnos :: Nov.09.2007 :: tekhnologia :: 4 Comments »
4 Responses to “Cover-Flowize Your Application”
IKImageBrwoserView → IKImageBrowserView
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
“selectedIndex” is an observable value which does that
Thanks for your work.
I have a problem while updating the data source of an IKImageFlowView.
- I use reloadData,
- the IKImageFlowView requires data for all indices via – (id) imageFlow:(id)aFlowLayer itemAtIndex:(int)index
but
• previous imageItems do not disappear,
• new imageItems are added only for new indices > previous indices .
Philippe