I'm developing an NSTableView (cell based) app based in Xcode5 and I want to get each NSTextFieldCell's cell for determining row's height this is my code so far
- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row{
if (tableView == _tableView) {
NSTableColumn *column = [_tableView tableColumnWithIdentifier:@"Consecutivo"];
NSTextFieldCell *cell = [column dataCellForRow:row];
NSInteger occurences = [Functions FindOccurencesOfText:@"\n"
inWholeText:cell.stringValue];
if (occurences > 0) { return occurences * 17; }
else { return 17; }
}
else { return 17; }
}
but I cant get string's cell value
even if I put
NSLog(@"text: %@", cell.stringValue);
all I get is
text:
any help I'll appreciate