2

Am fetching data from server, and am able to receive all the data, but it shows blank cell when I run the project. When I keep the breakpoint I understood that the code is not executing after the VisitorsTableViewCell *cell = (VisitorsTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];.

NOTE: this code worked perfectly in xcode 6.4

- (NSInteger)numberOfSectionsInTableView:(UITableView *)aTableView {
    // Number of sections is the number of regions
    return 1;
}

- (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section {
    // Number of rows is the number of time zones in the region for the specified section

    return [VisitorsNameArray count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath  {
    static NSString *CellIdentifier = @"VisitorsTableCell";

    VisitorsTableViewCell *cell = (VisitorsTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    cell.visitorName.text = [VisitorsNameArray objectAtIndex:indexPath.row];
    cell.visitorComment.text =  [VisitorsCommentArray objectAtIndex:indexPath.row];
    cell.visitorDate.text =  [VisitorsDateArray objectAtIndex:indexPath.row];
    cell.visitorLocation.text =  [VisitorsLocationArray objectAtIndex:indexPath.row];

    return cell;
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579
jithin
  • 459
  • 8
  • 21

1 Answers1

0

Finally i solved it ,i dont know what wrong with the XCode 7.

I deleted my custom table cell from Storyboard and start all work again,and recreate with same design.Now it works perfectly.

jithin
  • 459
  • 8
  • 21
  • recreating the cell didn't solve it for me. Any other ideas? – Ehmad Zubair Oct 24 '15 at 12:08
  • Is it?,i just deleted and add new cell ,thats how it works for me,anyway plz check this link http://stackoverflow.com/questions/31899426/dequeuereusablecellwithidentifier-never-returns – jithin Oct 24 '15 at 13:16