title: UITableViewCell autoresizingmask issue
body: <p>I have 3 UI elements in the <code>contentView</code> of the <code>UITableViewCell</code> that need to be aligned properly when the device rotates. Currently, I enforce the frames of these UI Elements like this:     </p>
  
  <pre><code>segmentedControl1.frame = CGRectMake(165, 15, 130, 40);
  segmentedControl2.frame = CGRectMake(435, 15, 130, 40);
  segmentedControl3.frame = CGRectMake(710, 15, 130, 40);
  </code></pre>
  
  <p>I would like to know how I can use the autoresizingMask property of these elements to make them resize and not-overlap on one another when the device is rotated from Landscape to portrait (default is portrait, iPad only). I do not want to have custom frame positions for each orientation.</p>
  
  <p>I tried something like this:</p>
  
  <pre><code>segmentedControl1.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin;
  segmentedControl2.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
  segmentedControl3.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin;
  </code></pre>
  
  <p>But this doesn't seem to work. The elements are all overlapped and unhappily laid out.</p>
  
  <p>Any suggestions?</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Here's what the table view cell currently looks like in landscape mode:</p>
  
  <pre><code>--------------------------------------------------------------------------
  |    ============              ============             ============     |
  |   | A   |  B   |            | A   |  B   |           | A   |  B   |    |
  |    ============              ============             ============     |
  --------------------------------------------------------------------------
  </code></pre>
  
  <p>And here's what I want when the device is rotated to a portrait mode:</p>
  
  <pre><code>-------------------------------------------------------
  |    ============    ============    ============     |
  |   | A   |  B   |  | A   |  B   |  | A   |  B   |    |
  |    ============    ============    ============     |
  -------------------------------------------------------
  </code></pre>
  
  <p><strong>UPDATE 2</strong>
  Here's my code in cellForRowAtIndexPath incorporating suggestions from @Wolfert</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) 
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
      cell.contentView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
  
      // Configure the cell...
      segmentedControl1.frame = CGRectMake(165, 15, 180, 40);
      segmentedControl1.tag = indexPath.row;
      segmentedControl1.autoresizingMask = UIViewAutoresizingFlexibleRightMargin;
      [cell.contentView addSubview:segmentedControl1];
  
      segmentedControl2.frame = CGRectMake(435, 15, 180, 40);
      segmentedControl2.tag = indexPath.row;
      segmentedControl2.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
      [cell.contentView addSubview:segmentedControl2];
  
      segmentedControl3.frame = CGRectMake(710, 15, 180, 40);
      segmentedControl3.tag = indexPath.row;
      segmentedControl3.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
      [cell.contentView addSubview:segmentedControl3];
  
      return cell;
  }
  </code></pre>