Pergunta

I have view based on NSTableView with custom cell view (NSTableCellView subclass - it is also set in the Attributes inspector as a custom class). NSTableCellView is created from xib.

  1. Firstly in viewDidLoad I do

    NSNib *nib = [[NSNib alloc] initWithNibNamed:@"ApplicationInfoView" bundle:nil];
    [self.tableView registerNib:nib forIdentifier: @"ApplicationInfoView"];
    
  2. In the dataSource method tableView:objectValueForTableColumn:row: I do:

     ApplicationInfoView *infoView = [aTableView makeViewWithIdentifier:@"ApplicationInfoView" owner:self];
    

It is instantiated but the table doesn't show anything, although while scrolling, I can see in logs that the cells are created correctly.

Thank you.

Foi útil?

Solução

Ok my bad.
I should have to use tableView:viewForTableColumn:row: instead of tableView:objectValueForTableColumn:row:, which i chose automatically from data source (lets call it iOS to OSX syndrome).
Still do not understand why tableView:viewForTableColumn:row: is in delegate but not in data source.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top