0
IAM ajout d'objets à NSMutableArray et affichage de la valeur dans UITableView. Seul le premier objet de NSMutableArray est affiché. Où vais-je me tromper?Problèmes UITableView
Mon code snippet:
-(IBAction) segmentedControlIndexChanged:(id)sender {
int selectedSegment = ((UISegmentedControl*) sender).selectedSegmentIndex;
switch (selectedSegment) {
case 1: {
MatchSchedule *semiFinal1 = [[MatchSchedule alloc] initWithDeails:@"20 March"];
MatchSchedule *semiFinal2 = [[MatchSchedule alloc] initWithDeails:@"24 March"];
matchList = [[NSMutableArray alloc] initWithObjects:semiFinal1,semiFinal2,nil];
[semiFinal1 release];
[semiFinal2 release];
break;
}
default;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
...
....
MatchSchedule *matchSchedule = [knockoutStage objectAtIndex:indexPath.row];
cell.textLabel.text = matchSchedule.matchDate;
}
Merci beaucoup. C'est la gaffe que j'avais faite. J'ai juste négligé cette méthode. Maintenant, cela fonctionne parfaitement bien. – Swapna