Affichage des données Plist dans UItableview

J'ai un plist avec le dictionary et les nombres de strings par dictionary. Montrer dans l'url ci-dessous. Et cette list d'articles est dans des milliers dans le plist.

Je dois afficher ces données de plist dans le UItableview

image eneter .

Comment faire ça?

Mon code:

- (void)viewWillAppear:(BOOL)animated { // get paths from root direcory NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSSsortingng *documentsDirectory = [documentPaths objectAtIndex:0]; NSSsortingng *documentPlistPath = [documentsDirectory ssortingngByAppendingPathComponent:@"p.plist"]; NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:documentPlistPath]; valueArray = [dict objectForKey:@"title"]; self.mySections=[valueArray copy]; NSLog(@"value array %@",self.mySections); } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return [self.mySections count]; } -(NSSsortingng *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { NSSsortingng *key = [[self.mySections objectAtIndex:section]objectForKey:@"pass"]; return [NSSsortingng ssortingngWithFormat:@"%@", key]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [self.mySections count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSSsortingng *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier]; } // Configure the cell... NSUInteger section = [indexPath section]; NSUInteger row = [indexPath row]; cell.textLabel.text = [[self.mySections objectAtIndex:row] objectForKey:@"title"]; cell.detailTextLabel.text=[[self.mySections objectAtIndex:section] objectForKey:[allKeys objectAtIndex:1]]; return cell; } 

Vous avez terminé la fin de votre tableau.

C'est probablement parce que vous avez codé en dur le nombre de lignes pour chaque section à 5. À less qu'il y ait vraiment 5 lignes dans chaque section, vous devriez returnner une valeur dynamic ici.