objective-ccocoadouble-clickikimagebrowserviewnsresponder

How can i change IKImageBrowserView’s doubleclick behaviour?


I use a IKImageBrowserView in a Mac 10.9-only application.

When I doubleclick an item in the IKImageBrowserView the item is opened in Preview.

I want to change this behaviour and open a window of my own application with details about the doubleclicked item instead.

How can i simply disable IKImageBrowserView’s doubleclick behaviour?
What is the best way to add my own doubleclick behaviour?


Solution

  • As per apple docs, you need to set up a delegate for IKImageBrowserView and you can add your custom implementation in cellWasDoubleClicked method.

    - (void) imageBrowser:(IKImageBrowserView *) aBrowser cellWasDoubleClickedAtIndex:(NSUInteger) index {
        // This method signals that the user double-clicked an item in the image browser view. 
        // You can implement this method if you want to perform custom tasks at that time.
    }