title: How to load UILabels inside custom UITableView in different positions?
body: <p>I have a UITableView with custom cells with one UIImage and one UILabel right after the image.</p>
  
  <p>The first 3 rows the label must be at 'x' position 120 and all other must be at 'x' position 28.</p>
  
  <p>When the table loads all labels are at 'x' 120, but when I got to the detail view and then come back the set up I made is working. Problem is I need the layout working from the first time the table loads.</p>
  
  <p>The code I use to change the 'x' position is:</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! CategoriesCell
  
      switch indexPath.row {
          case 0:
              cell.categoryName.frame.origin.x = 120
          case 1:
              cell.categoryName.frame.origin.x = 120
          case 2:
              cell.categoryName.frame.origin.x = 120
          default:
              cell.categoryName.frame.origin.x = 28
              cell.categoryIcon.hidden = true
          break
      }
      return cell
  }
  </code></pre>
  
  <p>I tried to put the code that set´s the 'x' position for all the other labels on viewWillAppear, but it didn´t work.</p>
  
  <p>Anyone could have an idea of how I can accomplish this?</p>