Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Updated 27 March 2024
An action sheet can be useful in displaying the options to the users. Launch the Action sheet in iOS using the UIKit’s UIAlertViewController class.
In this blog, we will explore how you can display the options to the users using the UIAlertViewController’s property Style.
If you want to perform multiple actions from one single button you can make an action sheet that will come up from the bottom of the screen.
You can dismiss the action sheet using the cancel action.
You have to set the style of cancel as “.cancel” and others have a “.normal” style.
The action sheet comes from the bottom of the iPhone. To launch on iPad you have to set the frame of that action sheet. A simple example using an action sheet in Swift is. shown below.
Methods of those actions:-
Sometimes, there are multiple options to display to the users. We can achieve this by adding a for loop to the available options array.
The below code describes how you can achieve this.
addActions is a method defined in the extension for the UIAlertViewController.
Here is the output of the above code.
The action sheet is a popular and efficient way to display options to the users.
It can handle multiple options from an array.
We hope you would like this blog.
Please check our other blogsĀ here.
You may also check our Flutter app development page.
View More
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.