Mac Objective C NSTableView和NSTextViewCell,知道用户编辑单元格的时间

时间:2013-07-18 20:03:59

标签: nstableview nstableviewcell

不确定为什么这是难以捉摸的,看过文档。如何知道用户何时在NSTableView中编辑NSTableViewCell?

在IB动作中设置了文本归档单元格以结束发送结束编辑并连接已发送的动作,但没有快乐....当用户完成编辑单元格时,它不会被调用。

1 个答案:

答案 0 :(得分:0)

#pragma mark - Text Table Delegates

- (BOOL) control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
{
    self.editingString = [[NSString alloc] initWithString:fieldEditor.string];
    [self performSelector:@selector(updateSelection) withObject:nil afterDelay:0.1];
    return YES;
}