NSTableCellView图像查看操作

时间:2016-10-31 11:41:21

标签: cocoa xamarin action nstableview xamarin.mac

我需要在NSTableCellView中调用ImageView的catch动作。

我为它添加了一些动作,但是当我点击行动作时没有被调用... enter image description here

我已设置接受触摸事件属性为true,但没有结果

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

[MFRequestManager retrivesomeDataWithCompletion:^(id  _Nullable response) {
   if(Completion) 
    Completion(response)
    dispatch_semaphore_signal(sema);
 }];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);

1 个答案:

答案 0 :(得分:0)

图片视图不支持点击操作(使用NSButton)。

当用户将图像拖到其上时(如果将图像视图设置为可编辑),它确实支持操作。从未使用过这个想法。我从不在xcode中使用动作。但是总是在c#中订阅控件上的事件。对于默认操作,这是Activated事件。