- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:@"myCell"];
if (cell == nil)
{
[tableView registerNib:[UINib nibWithNibName:@"CustomCell" bundle:nil] forCellReuseIdentifier:@"myCell"];
cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:@"myCell"];
}
if (cell.tag == 0)
{
}
str = [jsonData objectAtIndex:cell.tag];
NSDictionary *dict = [jsonData objectAtIndex:indexPath.row];
cell.lblDeliveryTime.text = [dict valueForKey:@"sysord_ExpectedDeliveryTime"];
cell.lblOrderPlacedTime.text = [dict valueForKey:@"sysord_OrderDateTime"];
cell.lblDeliveryPickUP.text = [dict valueForKey:@"sysord_DeliveryType"];
NSDictionary *dict1 = [jsonData objectAtIndex:cell.tag];
orderidString = [dict1 valueForKey:@"sysord_ID"];
DetailViewController *detailVC=[[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil];
return cell;
}
-[__NSCFNumber length]: unrecognized selector sent to instance
4.1k Views Asked by kinjal shah At
2
When you assign an object from dictionary to a
text
, you need to make sure it's a NSString type.