Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to put array elements on a table view cell
    primarykey
    data
    text
    <p>I've been trying to put the value of my array in my table view cells, it's multidimensional array how should i do it?</p> <p>here's a parser class</p> <pre><code>-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"subsidiary"]) { NSLog(@"%i", [app.infoarray count]); [app.listArray addObject:app.infoarray]; [app.infoarray removeAllObjects]; } else { if ([elementName isEqualToString:@"countryname"]) { temp = currentElementValue; } if ([elementName isEqualToString:@"name"]) { theList.name = currentElementValue; [app.infoarray addObject:theList.name]; } if ([elementName isEqualToString:@"address"]) { theList.address = currentElementValue; [app.infoarray addObject:theList.address]; } </code></pre> <p>the code below is the mainviewcontroller</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } theList.countryname = [app.listArray objectAtIndex:0]; cell.textLabel.text= theList.countryname; ////&lt;&lt;WHAT SHOULD I DO HERE? cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } </code></pre> <p>I just want the cell.textlabel to display the country name I'm just new in objective-c i hope someone can help me</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload