Définir NSIndexPath par programme

Ma question est: Comment définir NSIndexPath par programmation.

Par exemple, j'ai ajouter une méthode:

- (void)setDefaultValue{
 tempIndexPath = [NSIndexPath indexPathForRow:0 inSection:1];
}

Dans tableView délégué -cellForRowAtIndexPath je veux comparer deux indexPath

si([indexPath isEqual:tempIndexPath]) ...

Mais dans ce cas, mon tempIndexPath = null (je pense - parce que c'est autorelease objet)

Comment définir NSIndexPath dans ce cas?

Merci À Tous!

source d'informationauteur Matrosov Alexander