---
title: "Create action sheet in iOS using UIAlertController in Objective-C"  
description: "You can create action sheet in iOS 8 or later version using UIAlertController Following is the sample code for creating action sheet using UIAlertCont"  
author: "Sunil Singh"  
published: 2017-01-11  
updated: 2018-03-17  
canonical: https://www.mindstick.com/blog/11254/create-action-sheet-in-ios-using-uialertcontroller-in-objective-c  
category: "ios"  
tags: ["iphone", "ios", "iphone sdk", "objective c"]  
reading_time: 1 minute  

---

# Create action sheet in iOS using UIAlertController in Objective-C

You can create [action](https://www.mindstick.com/forum/155751/define-action-method-in-mvc) sheet in [iOS](https://www.mindstick.com/articles/12222/core-data-and-how-to-use-it-in-ios-objective-c) 8 or [later version](https://answers.mindstick.com/qa/50018/when-shouldn-t-i-upgrade-os-x-to-a-later-version) using UIAlertController **.****Following is the** [sample](https://www.mindstick.com/news/2174/mars-mission-by-nasa-prepares-for-tests) [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) for creating action sheet using UIAlertController-\

\

```
UIAlertController
*actionSheet = [UIAlertController
alertControllerWithTitle:@"Action
Sheet"
message:@"Action
Sheet example using UIAlertController "
preferredStyle:UIAlertControllerStyleActionSheet];[actionSheet
addAction:[UIAlertAction
actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction
*action) {NSLog(@"Cancel
button tapped");[self
dismissViewControllerAnimated:YES
completion:^{}];}]];[actionSheet
addAction:[UIAlertAction
actionWithTitle:@"Delete"
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction
*action) {NSLog(@"Delete
button tapped");[self
dismissViewControllerAnimated:YES
completion:^{}];}]];[actionSheet
addAction:[UIAlertAction
actionWithTitle:@"Create"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction
*action) {NSLog(@"Create
button tapped");[self
dismissViewControllerAnimated:YES
completion:^{}];}]];[actionSheet
addAction:[UIAlertAction
actionWithTitle:@"Select
All"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction
*action) {NSLog(@"Select
All button tapped");[self
dismissViewControllerAnimated:YES
completion:^{}];}]];[self
presentViewController:actionSheet
animated:YES
completion:nil];
```

\

**Following is the sample [screen](https://www.mindstick.com/forum/33644/loading-screen-during-ajax-call) shot of action sheet using UIAlertController-**

***\***

![Create action sheet in iOS using UIAlertController in Objective-C](https://www.mindstick.com/blogs/2a48e493-4193-46d5-ba14-185a94e865f0/images/0c3ebd93-2dca-470e-bbca-8d7759c03d03.png)\

---

Original Source: https://www.mindstick.com/blog/11254/create-action-sheet-in-ios-using-uialertcontroller-in-objective-c

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
