Questions tagged [uiactionsheet]

UIActionSheet and UIActionSheetDelegate is deprecated in iOS 8. To create and manage action sheets in iOS 8 and later, instead use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet. The UIActionSheet class of the Apple iOS can be used to present to user a modal view with a descriptive text and some buttons the user can choose from. An action sheet displays a set of choices related to a task the user initiates.

The action sheet has two different appearances. On iPhone (), an action sheet always emerges from the bottom of the screen and hovers over the application’s views (an action sheet for Safari on iPhone is shown above). The side edges of an action sheet are anchored to the sides of the screen, which reinforces its connection to the app and to the user’s most recent action.

On iPad (), an action sheet is always displayed within a popover; it never has full-screen width. An action sheet can cause a popover to appear, or it can appear within a popover that is already open. In both cases, there is a strong visual connection between the action sheet and the user’s action.

An action sheet always contains at least two buttons that allow users to choose how to complete their task. When users tap a button, the action sheet disappears. An action sheet does not include a title or explanatory text, because it appears in immediate response to a user action.

Resources:

1001 questions
116
votes
7 answers

UIActionSheet cancel button strange behaviour

I have a UIBarButtonItem opening an action sheet to offer users choices about what to do. Everything works as expected unless I try to click on the "Cancel" button. The target of the button appears to have moved up from where it should be. I can…
nevan king
  • 108,735
  • 42
  • 196
  • 237
110
votes
4 answers

Create UIActionSheet 'otherButtons' by passing in array, not varlist

I have an array of strings that I want to use for button titles on a UIActionSheet. Unfortunately, the otherButtonTitles: argument in the method invocation takes a variable length list of strings, not an array. So how I can I pass these titles into…
Greg Maletic
  • 6,205
  • 8
  • 51
  • 73
104
votes
16 answers

How to present UIActionSheet iOS Swift?

How To Do UIActionSheet in iOS Swift? Here is my code for coding UIActionSheet. @IBAction func downloadSheet(sender: AnyObject) { let optionMenu = UIAlertController(title: nil, message: "Choose Option", preferredStyle: .actionSheet) let…
Yu Yu Mon Win
  • 1,147
  • 2
  • 8
  • 13
86
votes
8 answers

ActionSheet not working iPad

I'm using ActionSheet in my application. On my iPhone it works, but it doesn't on the iPad simulator. this is my code: @IBAction func dialog(sender: AnyObject) { let optionMenu = UIAlertController(title: nil, message: "Choose Option",…
Stephany
  • 974
  • 1
  • 7
  • 18
62
votes
8 answers

Swift UIAlertController -> ActionSheet iPad iOS8 Crashes

currently i'm running into big trouble with my ActionSheet. On iPhone it works great, but on iPad it only crashes I create a new project with only one button import UIKit extension ViewController : UIActionSheetDelegate { func…
Fabian Boulegue
  • 6,024
  • 14
  • 45
  • 70
58
votes
9 answers

Presenting a view controller modally from an action sheet's delegate in iOS8 - iOS11

So I noticed that in iOS8 beta 3 (Update: still happens in iOS 11.2) on iPad, when attempting to present a view controller from within a delegate method of a UIActionSheet, "nothing" happens and a log message is output to the debug console, stating…
Leo Natan
  • 55,734
  • 8
  • 140
  • 186
58
votes
4 answers

Creating UIActionSheet

I would like to create this kind of menu, of course with other menu buttons. Is there any default viewcontroller representing it, or do I have to get images and create this by myself.
mbutan
  • 1,309
  • 2
  • 11
  • 22
53
votes
6 answers

How to use UIAlertController to replace UIActionSheet?

I am maintaining an old iOS project which based on SDK 6.0. A method on this project called -(void) showComboBox:(UIView*)view:withOptions:(NSDictionary*)options is used to show a combo box. To achieve the goal, it used UIActionSheet, which is…
Don_Chen
  • 917
  • 1
  • 7
  • 16
51
votes
6 answers

Add UIPickerView in UIActionSheet from IOS 8 not working

I am adding UIPickerView to UIActionsheet but its working perfectally in ios 7 but not working in ios 8. Please help me to solve that. Here i attached screenshot for that. Thanks I am using following code for that. UIActionSheet…
Jignesh Patel
  • 755
  • 1
  • 8
  • 10
47
votes
6 answers

UIActionSheet from Popover with iOS8 GM

Anyone is getting this message while trying to show UIActionSheet from popover? Your application has presented a UIAlertController () of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is…
Tomer Peled
  • 3,472
  • 4
  • 30
  • 51
46
votes
8 answers

UIActionSheet is not showing separator on the last item on iOS 7 GM

It could be probably a bug on iOS7. But the last button is not separated from the previous one As you can see from the image. This happens on both Simulator and device using iOS7 GM. Does everyone else has the same problem? UIActionSheet…
Punty
  • 900
  • 2
  • 11
  • 17
41
votes
9 answers

Change Text Color of Items in UIActionSheet - iOS 8

I had been using following code to change text color of items which I add in UIActionSheet.: - (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *subview in actionSheet.subviews) { if ([subview…
Salman Zaidi
  • 8,426
  • 12
  • 42
  • 60
36
votes
10 answers

Issue with UIActionSheet

When I run my app and I click button for actionsheet appears this: Presenting action sheet clipped by its superview. Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:]…
Joaquin McCoy
  • 525
  • 1
  • 5
  • 11
36
votes
11 answers

Change text color in UIActionSheet buttons

In my project, I am using UIActionSheet for displaying for some sorting type. I want to change the color of the text displayed in the action sheet buttons. How can we change the text color?
kiri
  • 1,907
  • 5
  • 26
  • 51
33
votes
12 answers

Adding Images to UIActionSheet buttons as in UIDocumentInteractionController

Is it possible to add an image to the buttons of the UIActionSheet as seen in UIDocumentInteractionController? If so, please let me know how it is done.
1
2 3
66 67