title: How to wrap a text on a UIButton in swift
body: <p>I try to wrap a text on a button as follow:</p>
  
  <pre><code>nextButton=UIButton(frame: CGRectMake(buttonHWidth, textHeigth, buttonHWidth, buttonHeigth));
  
          nextButton.backgroundColor = UIColor.lightGrayColor()
          nextButton.setTitle("", forState: UIControlState.Normal)
          nextButton.addTarget(self, action: "buttonAction:", forControlEvents: UIControlEvents.TouchUpInside)
          nextButton.tag = 22;
  
  
          label_nextButton = UILabel(frame: CGRectMake(buttonHWidth, textHeigth, buttonHWidth, buttonHeigth));
          label_nextButton.textAlignment = NSTextAlignment.Center;
          label_nextButton.numberOfLines = 2;
          label_nextButton.font = UIFont.systemFontOfSize(16.0);
          label_nextButton.text = "Prss next Press next";
          label_nextButton.textColor=UIColor.blackColor();
  
          nextButton.addSubview(label_nextButton);
          self.view.addSubview(nextButton);
  </code></pre>
  
  <p>I can see the button on the device, but I don't see any text.</p>
  
  <p>What am I doing wrong ? Or can this be done without adding a label to a button ?
  Thanks for helping.</p>
  
  <p>Illustration. It looks like :</p>
  
  <p><img src="https://i.stack.imgur.com/REK4j.png" alt="enter image description here"></p>
  
  <p>When just doing:</p>
  
  <pre><code>nextButton.setTitle("this is a very very long text", forState: UIControlState.Normal)
  </code></pre>