Domanda

Ok, quindi im alla fine del mio ingegno qui. Ho provato ogni cosa si possa immaginare per sbarazzarsi di questi errori

Heres il mio codice:

  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // Navigation logic may go here. Create and push another view controller.
 /*
  //<#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
     // ...
     // Pass the selected object to the new view controller.
  [self.navigationController pushViewController:detailViewController animated:YES];
  [detailViewController release];
  */
 NSInteger row = [indexPath.row];
 if (self.nameExcerptPage == nil) {
  NameOTWexcerpt *nameExcerptPageDetail = [[nameExcerptPage alloc] initWithNibName:@"NameOTWexcerpt" bundle:nil];
  self.nameExcerptPage = nameExcerptPageDetail;
  [nameExcerptPageDetail release];

 nameExcerptPage.title = [NSString stringWithFormat:@"%&", [TheBookNavTabs objectAtIndex:row]];

 Rothfuss_ReaderAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
 [delegate.SecondTableViewController pushViewController:TheBookNavTabs animated:YES];
 }
}

e l'errore si verifica in cui si dice "NSInteger fila = [indexPath.row];

aiuto per favore! grazie!

È stato utile?

Soluzione

NSInteger row = [indexPath.row];

In entrambi i notazione del punto o [] ma non entrambi!

thyrgle capito prima ...

Il "%&" identificatore di formato utilizzato in stringWithFormat mi ha un po 'confuso. Sarebbe questo %@? È un vero e proprio %& identificatore di formato? Che cosa fa? Il Google, non fa nulla ...

Altri suggerimenti

Ok sì ho cambiato in [fila indexPath] e ha funzionato.

Non sono sicuro circa il% e, l'ho presa da un tutorial e funziona. Questo è tutto quello che so

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top