title: iOS : Customizing TableViewCell - Initializing Custom Cell
body: <p>In my TableView, I have a dataSource of NSMutableArray *currList - it contains objects of object Agent. I created customized TableCell and set up everything properly. I am finding problem while displaying data :</p>
  
  <pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
       static NSString *simpleTableIdentifier = @"ChatListCell";
  
       // Custom TableViewCell
       ChartListCell *cell = (ChartListCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
  
       if (cell == nil) {
             // I believe here I am going wrong
             cell = [[ChartListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
             NSLog(@"Cell = %@", cell);  // Shows null
       }
       /*
       With UITableViewCell, things are working perfectly fine
       UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
       if (cell == nil) {
           cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
       }
       */
       Agent *agent = (Agent *)[currChatList objectAtIndex:indexPath.row];
       NSLog(@"Agent name - %@", agent.name);   // Prints proper data
       cell.nameLabel.text = agent.name;
       cell.thumbImageView.image = [UIImage imageNamed:agent.photo];
       cell.timeLabel.text = agent.chatTime;
  
       return cell;
  }
  </code></pre>
  
  <p>As you can see in above code comments, If I comment the custom ChartListCell and use UITableViewCell, it works properly. But with ChartListCell, nothing comes up and in logs I get "Cell = null" &amp; Agent name is showing properly. 
  Cell shouldn't be null. Why is it null, can anyone please help me out with this. Where am I doing mistake ? </p>
  
  <p>Any help is highly appreciated.</p>
  
  <p>Thanks </p>