title: How to center UIButton in Swift?
body: <p>I have this code for my <code>UIButton</code>. What should I change in my <code>CGRectMake</code> to set my <code>UIButton</code> in the center of the screen for all screen sizes?</p>
  
  <pre><code>let loginBtn = UIButton(frame: CGRectMake(60, 360, 240, 40))
  loginBtn.layer.borderColor = UIColor.whiteColor().CGColor
  loginBtn.layer.borderWidth = 2
  loginBtn.titleLabel!.font = UIFont.systemFontOfSize(24)
  loginBtn.tintColor = UIColor.whiteColor()
  loginBtn.setTitle("Login", forState: UIControlState.Normal)
  self.view.addSubview(loginBtn)
  </code></pre>