title: swift UIAlertController with pickerView button action stay up
body: <p>I am new in swift and I am trying to make <code>UIAlertContoller</code> with <code>PickerView</code>
  but I have problems with the Buttones,
  Here a photo</p>
  
  <p><img src="https://i.stack.imgur.com/jyuKu.png" alt="enter image description here"> </p>
  
  <p>I am trying to change the constraint of the buttons to stay up.
  I read a lot of answers here but I did not find any solution</p>
  
  <p>Here is my code:</p>
  
  <pre><code>func distance(){
      let editRadiusAlert = UIAlertController(title: "Choose distance", message: "", preferredStyle: UIAlertControllerStyle.alert)
      let pickeViewFrame: CGRect = CGRect(x: 0, y: 0, width: 250, height: 300)
      let pickerViewRadius: UIPickerView = UIPickerView(frame: pickeViewFrame)
      pickerViewRadius.delegate = self
      pickerViewRadius.dataSource = self
      editRadiusAlert.view.addSubview(pickerViewRadius)
      editRadiusAlert.addAction(UIAlertAction(title: "Done", style: UIAlertActionStyle.default,handler:nil))
      editRadiusAlert.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil))
      editRadiusAlert.view.addConstraint(NSLayoutConstraint(item: editRadiusAlert.view, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: self.view.frame.height * 0.5))
      self.present(editRadiusAlert, animated: true, completion: nil)
  } 
  </code></pre>