didSelectRowAtIndexPath à l'article

J'ai un UITableView qui j'ai attribué les sections. Lors de l'utilisation de didSelectRowAtIndex avec indexPath.ligne je ne suis pas d'obtenir la valeur correcte. Disons que je suis dans la section 2, puis il commence à la ligne d'index à 0 et, par conséquent, je suis le mauvais indice.

Quelqu'un peut me dire comment résoudre ce problème? Je me rends compte qu'il est possible d'obtenir la section de l'index par indexPath.section mais je ne peux pas comprendre comment les utiliser.

bandDetailViewController.band = [self.programArray objectAtIndex:indexPath.row];

J'espère que vous pourrez m'aider. Merci d'avance 🙂

EDIT:

Des données de l'échantillon. Mes cellules pour l'affichage de la table est chargé de cette plist.

<array>
    <dict>
        <key>name</key>
        <string>Alphabeat</string>
        <key>description</key>
        <string>Long description.</string>
        <key>scene</key>
        <string>Store Scene</string>
        <key>date</key>
        <date>2011-02-04T20:09:40Z</date>
        <key>hasDate</key>
        <true/>
        <key>weekDay</key>
        <string>Onsdag</string>
        <key>youtubeVideo</key>
        <string>http://www.youtube.com/watch?v=dB01PTZNpBc</string>
    </dict>
    <dict>
        <key>name</key>
        <string>Anne Linnet</string>
        <key>description</key>
        <string>Long description.</string>
        <key>scene</key>
        <string>Store Scene</string>
        <key>date</key>
        <date>2011-02-04T20:09:40Z</date>
        <key>hasDate</key>
        <true/>
        <key>weekDay</key>
        <string>Onsdag</string>
        <key>youtubeVideo</key>
        <string>http://www.youtube.com/watch?v=jWMSqS7fL9k</string>
    </dict>
</array>

OriginalL'auteur simonbs | 2011-02-07