title: Setting text to fit the size of a UILabel and centre in SWIFT
body: <p>I'm trying to set text to fit the size of a <code>UILabel</code> and also be centred. I am doing this programmatically. This is what it looks like currently:</p>
  
  <p><img src="https://i.stack.imgur.com/3dN6O.png" alt="enter image description here"></p>
  
  <p>As you can see, the text is going off the screen and is also not centred.</p>
  
  <p>This is my code:</p>
  
  <pre><code>let questions = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac faucibus tellus."
  
  questionsLabel = UILabel(frame: CGRectMake(10, 10, questionsView.frame.size.width - 20, 80))
  questionsLabel.text = questions
  questionsLabel.font = UIFont(name: Font.FuturaMedium, size: 25)
  questionsLabel.sizeToFit()
  questionsLabel.numberOfLines = 0
  questionsLabel.textAlignment = NSTextAlignment.Center
  questionsView.addSubview(questionsLabel)
  </code></pre>
  
  <p>What am I doing wrong?</p>