Comment centrer UILabel sur Swift?

Je suis en train de centre de texte mais je, il ne semble pas fonctionner.

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        //Do any additional setup after loading the view, typically from a nib.


        let title = UILabel()
        title.text = "Some Sentence"
        title.numberOfLines = 0
        title.frame = CGRectMake(self.view.bounds.size.width/2,50,self.view.bounds.size.width, self.view.bounds.size.height) //x , y, width , height
        title.textAlignment = .Center
        title.sizeToFit()
        title.backgroundColor = UIColor.redColor()
        self.view.addSubview(title)

    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        //Dispose of any resources that can be recreated.
    }

}

Qui est le code que j'utilise, mais c'est ce que j'obtiens:

Comment centrer UILabel sur Swift?

Ce n'est pas le centre de l'écran. Quelqu'un peut me dire ce que je fais mal?

source d'informationauteur elpita | 2016-01-07