Swift 3 - Horizontal Alignment of Buttons in UIAlertViewController

Viewed 1102

I want 3 buttons in UIAlertViewController Horizontally.But when i am trying to put 3 UIAlertAction it converts in UIActionSheet.

This is my code:-

   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 I Want UIalertView I Want

0 Answers
Related