title: UILabel text to fill in the frame width
body: <p>I want to build typography poster using UILabel</p>
  
  <ul>
  <li>left and margin: 25</li>
  <li>320(device width) - 50(sum of the margins) = 270(label width frame)</li>
  </ul>
  
  <p>The font size of each label should change in order to fit in 270 frame width</p>
  
  <p>I try with <strong>sizeToFit()</strong>,<strong>adjustsFontSizeToFitWidth=true</strong></p>
  
  <pre><code>var margin = 0;
  let label = UILabel(frame: CGRectMake(25 , 72, 270, 70));
  label.backgroundColor = UIColor.clearColor();
  label.textAlignment = NSTextAlignment.Left;
  label.textColor = UIColor.blackColor();
  label.numberOfLines = 1;
  label.font = UIFont.systemFontOfSize(50.0);
  label.text = "Some Text";
  label.adjustsFontSizeToFitWidth = true;
  self.view.addSubview(label);
  margin += 60;
  
  let label2 = UILabel(frame: CGRectMake(25 , CGFloat(72+margin), 270, 70));
  label2.backgroundColor = UIColor.clearColor();
  label2.textAlignment = NSTextAlignment.Left;
  label2.textColor = UIColor.whiteColor();
  label2.numberOfLines = 1;
  label2.font = UIFont.boldSystemFontOfSize(45.0);
  label2.text = "Some Text Longer";
  self.view.addSubview(label2);
  </code></pre>
  
  <p>Screenshot when lable1 and label2 <strong>adjustsFontSizeToFitWidth=true</strong></p>
  
  <p><img src="https://i.stack.imgur.com/k6Z35.png" alt="enter image description here"></p>
  
  <p>The text should start from the end of first grey border and end in the beginning at the start of the second grey border</p>