tags:

views:

9

answers:

1

m having this coe....could any one tell me how can i print it on UITable view cell

[customerDetailsArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:nameStr,@"name",cityStr,@"city",countryStr,@"country",nil]]; NSLog(@"customerDetailsArray %@",customerDetailsArray);

I am trying by this way but nt successful

if(indexPath.row == 0) { cell.textLabel.text = [NSString stringWithFormat:@"",[[customerDetailsArray objectAtIndex:indexPath.row] objectForKey:@"name"]]; }

Thank You..If u like my question atleast accept it......

A: 

You are putting in a blank string every time. Change it to this:

if(indexPath.row == 0) { 
    cell.textLabel.text = [NSString stringWithFormat:@"%@",[[customerDetailsArray objectAtIndex:indexPath.row] objectForKey:@"name"]]; 
}

Notice the %@

Matt Williamson
Thank You Matt for quick reply but u know..even i had tried that..but NULL value appear on UITable view cell....but when i print the array by using NSLog...it Prints properly....Waiting for ur response Matt
talktobijju
You did put the `%@` in the `[NSString stringWithFormat:@"%@"` ?Can you past in what the array looks like then?
Matt Williamson