Swift 3 - UIAlertViewController中按钮的水平对齐

时间:2017-09-27 10:08:11

标签: ios swift uialertview

我想在UIAlertViewController水平放置3个按钮。但是当我尝试放置3个UIAlertAction时,它会转换为UIActionSheet

这是我的代码: -

   let alertv = UIAlertController.init(title: "Mesage", message: "Please Select one", preferredStyle: .alert)
    let beenT = UIAlertAction.init(title: "Create", style: .default, handler: nil)
    let viw = UIAlertAction.init(title: "View", style: .default, handler: nil)
    let cancel = UIAlertAction.init(title: "Cancel", style: .cancel, handler: nil)

    alertv.addAction(beenT)
    alertv.addAction(viw)
    alertv.addAction(cancel)
    present(alertv, animated: true, completion: nil)

UIAlertView我想要的   UIalertView I Want

0 个答案:

没有答案