title: UITableViewCellStyle Custom iOS 7
body: <p>I'm having a bit confusion with the UITableViewCellStyle. I want to create a custom UITableViewCell like this:</p>
  
  <p><img src="https://i.stack.imgur.com/NbYpH.png" alt="enter image description here"></p>
  
  <p>But the text and the image not appear in the cell when I run the app. In Storyboard,I've put the TableView Style to 'Custom'.</p>
  
  <p><img src="https://i.stack.imgur.com/EiZkz.png" alt="enter image description here"></p>
  
  <p>What am I doing wrong?  </p>
  
  <p><strong>MainTableViewController</strong></p>
  
  <pre><code>#import "MainTableViewController.h"
  #import "CustomMainCell.h"
  
  static NSString *CellIdentifier = @"MainCell";
  
  @interface MainTableViewController ()
  
  //
  @property(nonatomic, strong) NSArray *dataSource;
  
  //
  @property(nonatomic, strong) NSArray *iconsSource;
  
  @end
  
  @implementation MainTableViewController
  
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      self.title = @"Currículum Vitae";
  
      // Inicializo los arrays con los datos
      self.dataSource = @[@"PERFIL",@"EXPERIENCIA",@"EDUCACIÓN",@"HABILIDADES",@"INTERESES"];
      self.iconsSource = @[@"perfil.png",@"experiencia.png",@"educacion.png",@"habilidades.png",@"intereses"];
  
      // Register Class for Cell Reuse Identifier
      [self.tableView registerClass:[CustomMainCell class] forCellReuseIdentifier:CellIdentifier];
  
      // This will remove extra separators from tableview
      self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
  
      // Eliminio las líneas que separan las celdas
      self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  #pragma mark - Table view data source
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
  
      // Return the number of sections.
      return 1;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
  
      // Return the number of rows in the section.
      return self.dataSource.count;
  }
  
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      CustomMainCell *cell = (CustomMainCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
      if (cell == nil) {
          cell = [[CustomMainCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
      }
  
      // Configure the cell...
      cell.title.text = self.dataSource[indexPath.row];
      cell.icon.image = self.iconsSource[indexPath.row];
  
      return cell;
  }
  </code></pre>
  
  <p><strong>CustomMainCell.h</strong></p>
  
  <pre><code>@interface CustomMainCell : UITableViewCell
  
  //
  @property (weak, nonatomic) IBOutlet UILabel *title;
  
  //
  @property (weak, nonatomic) IBOutlet UIImageView *icon;
  
  @end
  </code></pre>
  
  <p><strong>CustomMainCell.m</strong></p>
  
  <pre><code>#import "CustomMainCell.h"
  
  @implementation CustomMainCell
  
  - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  {
      self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
      if (self) {
          // Initialization code
          self.textLabel.textColor = [UIColor brownColor];
      }
      return self;
  }
  
  - (void)awakeFromNib
  {
      // Initialization code
  }
  
  - (void)setSelected:(BOOL)selected animated:(BOOL)animated
  {
      [super setSelected:selected animated:animated];
  
      // Configure the view for the selected state
  }
  
  @end
  </code></pre>