Question

Ok, donc im à la fin de mon esprit ici. J'ai essayé tout ce qu'on puisse imaginer pour se débarrasser de ces erreurs

Heres mon code:

  - (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];
 }
}

et l'erreur apparaît où il est dit « NSInteger rang = [indexPath.row];

aide s'il vous plaît! merci!

Était-ce utile?

La solution

NSInteger row = [indexPath.row];

Soit la notation par points ou [] mais pas les deux!

thyrgle a d'abord ...

Le spécificateur de format « %& » utilisé dans stringWithFormat m'a un peu confus. Si tel était %@? Est %& un vrai spécificateur de format? Qu'est ce que ça fait? Google, il ne fait rien ...

Autres conseils

Ok ouais je l'ai changé [ligne de indexPath] et cela a fonctionné.

Je ne suis pas sûr de l'% et, je l'ai d'un tutoriel et il fonctionne. C'est tout ce que je sais

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top