我在仅限 Mac 10.9 的应用程序中使用 IKImageBrowserView
。
当我双击 IKImageBrowserView
中的某个项目时,该项目将在预览中打开。
我想更改此行为并打开我自己的应用程序的窗口,其中包含有关双击项目的详细信息。
如何简单地禁用 IKImageBrowserView
的双击行为?
添加我自己的双击行为的最佳方法是什么?
最佳答案
As per apple docs ,您需要为 IKImageBrowserView
设置委托(delegate),并且可以在 cellWasDoubleClicked
方法中添加自定义实现。
- (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.
}
关于objective-c - 如何更改 IKImageBrowserView 的双击行为?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23824474/