title: UISlider changing width depending on device
body: <p>I'm a beginner in iOS programming and I'm looking for an answer to my question.</p>
  
  <p>I have a UISlider inside a UITableViewCell and I'm trying to get this disposition: Label-Slider-DetailLabel(dynamic). </p>
  
  <p>This is my code :</p>
  
  <pre><code>cell = [tableView dequeueReusableCellWithIdentifier:@"SelectedMeetingCell"];
  [cell.textLabel setText:@"Duration"];
  [cell.detailTextLabel setText:[Utilities StringFromDuration:Agenda.InitialDuration.doubleValue]];
  
  sliderCell = (SliderCell*)[[UIViewController alloc] initWithNibName:@"SliderCell" bundle:nil].view;
  [sliderCell setDelegate:self];
  [sliderCell.slider setValue:Agenda.InitialDuration.doubleValue];
  
  [cell.contentView addSubview:sliderCell];
  
  sliderCell.slider.frame = CGRectMake(100, 0, 500, 44);
  </code></pre>
  
  <p>The last line is the way I used to place my slider the way I wanted to be. It works great for iPad but not at all for the iPhone version. Is there any way to resize the width of my slider automatically depending on the device ?</p>
  
  <p>(SliderCell is a UITableViewCell with a UISlider @property)</p>
  
  <p>Thank you all in advance!</p>