please check this link . I made a project as per your requirement using actionSheet. you can just make use of this code for reference and embed it in your project
https://drive.google.com/open?id=0Bz8kF1Gedr7fd0JzcTh6c0JVMGs
As if you want to increase the height of action sheet yes you can do it
method 1 - Use this to increase actionSheet height and increase the height of view Embedded in it
func showAleert(){
let alertController = UIAlertController(title: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", message: nil, preferredStyle: UIAlertControllerStyle.actionSheet) //if you increase actionSheet height to move default button down increase \n \n count and get your layout proper
let margin:CGFloat = 10.0
let rect = CGRect(x: margin, y: margin, width: alertController.view.bounds.size.width - margin * 4.0, height: 320)
let customView = UIView(frame: rect)
customView.backgroundColor = .clear //Background colour as clear
customView.addSubview(buttonn)
customView.addSubview(buttonn1)
customView.addSubview(buttonn2)
customView.addSubview(label)
customView.addSubview(label1)
customView.addSubview(label2)
alertController.view.addSubview(customView)
let ExitAction = UIAlertAction(title: "Go", style: .default, handler: {(alert: UIAlertAction!) in
if self.juiceBool == true {
//go to juice Controller
print("juice")
}
if self.FoodBool == true{
//go to food controller
print("food")
}
if self.FurnitureBool == true{
//go to furniture controller
print("furniture")
}
if (self.juiceBool == false) && (self.FurnitureBool == false) && (self.FoodBool == false){
//peform your operation like naything you want safety side
print("Not selected Any")
}
})
let height:NSLayoutConstraint = NSLayoutConstraint(item: alertController.view, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: self.view.frame.height * 0.80) //here you can define new height for action Sheet
alertController.view.addConstraint(height);
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: {(alert: UIAlertAction!) in print("cancel")})
alertController.addAction(ExitAction)
alertController.addAction(cancelAction)
DispatchQueue.main.async {
self.present(alertController, animated: true, completion:{})
}
}
Method 2 - As a View is added you can add scrollView Anything you like IF your option Succeeds more than Like 10,30 or big in number make use of method 1 and give a proper height and then add a scroll view in embedded view with multiple buttons
or
you can just add upto 10 options if you modify actionSheet by using method 1