Here is a sample code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { OMAllAbonementTableViewCell *cellAbonement = [tableView dequeueReusableCellWithIdentifier:abonementIdentifier]; OMVIPAbonementTableViewCell *cellVIPAbonement = [tableView dequeueReusableCellWithIdentifier:vipabonementIdentifier]; if (!cellAbonement) { cellAbonement = [[OMAllAbonementTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:abonementIdentifier]; } OMAbonement *abonement = (OMAbonement *)self.allBenefit[indexPath.row]; cellAbonement.benefitAbonementImage.image = abonement.photo; cellAbonement.benefitAbonementLabel.text = [NSString stringWithFormat:@"%@ %@", abonement.name, abonement.surname]; if (!cellVIPAbonement) { cellVIPAbonement = [[OMVIPAbonementTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:vipabonementIdentifier]; } OMVIPAbonement *vipabonement = (OMVIPAbonement *)self.allBenefit[indexPath.row]; cellVIPAbonement.benefitVIPAbonementImage.image = vipabonement.photo; cellVIPAbonement.benefitVIPAbonementLabel.text = [NSString stringWithFormat:@"%@", vipabonement.name]; return cellVIPAbonement; return cellAbonement; }