@@ -135,7 +135,7 @@ -(NSData*)dataWithCSVConfig:(CSVConfiguration*)config error:(NSError**)outError
135
135
[headerRow addObject: @" " ];
136
136
}
137
137
for (NSTableColumn * col in self.tableView .tableColumns ){
138
- [headerRow replaceObjectAtIndex: col.identifier.integerValue withObject: col.title ];
138
+ [headerRow replaceObjectAtIndex: col.identifier.integerValue withObject: col.headerCell.stringValue ];
139
139
}
140
140
exportData = [@[headerRow] arrayByAddingObjectsFromArray: exportData];
141
141
}
@@ -568,7 +568,7 @@ -(void)updateTableColumns {
568
568
for (int i = 0 ; i < _maxColumnNumber; ++i) {
569
569
NSTableColumn *tableColumn = [[NSTableColumn alloc ] initWithIdentifier: [NSString stringWithFormat: @" %d " ,i]];
570
570
tableColumn.dataCell = dataCell;
571
- tableColumn.title = i < columnNames.count ? columnNames[i] : [self generateColumnName: i];
571
+ tableColumn.headerCell . stringValue = i < columnNames.count ? columnNames[i] : [self generateColumnName: i];
572
572
((NSCell *)tableColumn.headerCell ).alignment = NSCenterTextAlignment ;
573
573
[self .tableView addTableColumn: tableColumn];
574
574
}
@@ -578,7 +578,7 @@ -(void)updateTableColumnsNames {
578
578
if (!self.csvConfig .firstRowAsHeader ){
579
579
for (int i = 0 ; i < [self .tableView.tableColumns count ]; i++) {
580
580
NSTableColumn *tableColumn = self.tableView .tableColumns [i];
581
- tableColumn.title = [self generateColumnName: i];
581
+ tableColumn.headerCell . stringValue = [self generateColumnName: i];
582
582
((NSCell *)tableColumn.headerCell ).alignment = NSCenterTextAlignment ;
583
583
}
584
584
}
@@ -850,7 +850,7 @@ -(void)addColumnAtIndex:(long) columnIndex {
850
850
NSTableColumn *col = [[NSTableColumn alloc ] initWithIdentifier: [NSString stringWithFormat: @" %ld " ,columnIdentifier]];
851
851
col.dataCell = dataCell;
852
852
[self .tableView addTableColumn: col];
853
- col.title = @" " ;
853
+ col.headerCell . stringValue = @" " ;
854
854
[self .tableView moveColumn: [self .tableView numberOfColumns ]-1 toColumn: columnIndex];
855
855
856
856
for (NSMutableArray *rowArray in _data) {
@@ -901,7 +901,7 @@ -(void)restoreColumns:(NSMutableArray *)columnIds atIndexes:(NSIndexSet *)column
901
901
NSTableColumn *col = [[NSTableColumn alloc ] initWithIdentifier: columnIds[i]];
902
902
col.dataCell = dataCell;
903
903
if (self.csvConfig .firstRowAsHeader ){
904
- col.title = [columnNames objectAtIndex: ((NSString *)columnIds[i]).integerValue];
904
+ col.headerCell . stringValue = [columnNames objectAtIndex: ((NSString *)columnIds[i]).integerValue];
905
905
}
906
906
((NSCell *)col.headerCell ).alignment = NSCenterTextAlignment ;
907
907
[self .tableView addTableColumn: col];
0 commit comments