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:

1000 questions
9
votes
7 answers

Change tint color of UIAlertview and UIActionsheet buttons

I am trying to adapt my application for iOS 7. The issue I am having is I can not change the tint color of some controls. I did add self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; if (IOS7_OR_LATER) …
Bobrovsky
  • 13,789
  • 19
  • 80
  • 130
9
votes
3 answers

Invalid context error on iOS 7 when adding a UIPickerView inside a UIActionSheet?

I have an UIPickerView inside an UIActionSheet and have done that in a way suggested by many others here at SO: Add UIPickerView & a Button in Action sheet - How? how to add UIPickerView in UIActionSheet The solutions have worked fine until now when…
Magnus
  • 735
  • 3
  • 9
  • 20
8
votes
2 answers

iPad UIActionSheet not showing

I used code from this post to display a action sheet in my application. But it shows like What will be the reason? My code to display action sheet is UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil …
rakeshNS
  • 4,227
  • 4
  • 28
  • 42
8
votes
1 answer

Add Image and Text to Actions Sheet's Alert Button

I want to be able to add an icon and text to the AlertButton but the type is a type Text? struct NavigationAddItem: View { @State var showActionView = true var actionSheet: ActionSheet { ActionSheet(title: Text("Select an action"),…
sfung3
  • 2,227
  • 1
  • 9
  • 30
8
votes
3 answers

Is there some kind of UIAccessibility Alert Tone?

Is there any way to get iOS to play the tone that UIActionSheet plays when presented? It’s a sudden beep followed by the word "Alert". I've searched the documentation and haven't been able to find anything that looks appropriate.
Matthew Bischoff
  • 1,043
  • 11
  • 27
8
votes
1 answer

How to make a social sharing exception for Twitter / action sheet?

I am using the following code to call action sheet sharing in my app: - (IBAction)sendPost:(id)sender { NSArray *activityItems = nil; UIImage *appIcon = [UIImage imageNamed:@"appIcon.png"]; NSString *postText = [[NSString alloc]…
vzm
  • 2,440
  • 6
  • 28
  • 47
8
votes
6 answers

Change font type and size of UIActionSheet title string

I have a UIActionSheet with title string "DO: These tasks". In the title string, the substring "DO:" should be Bold(with a particular font size) and the substring "These tasks" should be Regular. Is it possible? How can I do this?
Xavi Valero
  • 2,047
  • 7
  • 42
  • 80
8
votes
2 answers

Android: iOS UIActionSheet equivalent

I am converting an iOS app over and need to implement the equivalent of a UIActionSheet from iOS to Android. What UI element would most closely mimic this. I am targeting Android 2.2 and up.
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
7
votes
5 answers

iOS 5.1 + UISplitViewController in PortraitMode + UIActionSheet in MasterController = Assertion failure

I have an app based on a UISplitViewController that shows an ActionSheet in the MasterViewController of the Split. Before iOS 5.1, I had no problems presenting the action sheet in the popover presented by the split, but now, apparently there is…
Omer
  • 5,470
  • 8
  • 39
  • 64
7
votes
4 answers

How can I sent an array of strings into an UIActionSheet varargs init method?

I have an action sheet with options that vary depending on the circumstances. There are enough different button titles that I would like to construct an array of those button titles first, but I can't figure out how to convert that into the varargs…
Micah Hainline
  • 14,367
  • 9
  • 52
  • 85
7
votes
2 answers

iPad UIActionSheet - Not displaying the last added button

I'm trying to display a UIActionSheet from my iPad. Here's the code that I'm using: -(void) presentMenu { UIActionSheet *popupMenu = [[UIActionSheet alloc] initWithTitle:@"Menu" delegate:self cancelButtonTitle:@"Cancel"…
Tejaswi Yerukalapudi
  • 8,987
  • 12
  • 60
  • 101
7
votes
2 answers

SwiftUI Share Sheet Crashes iPad

I was following this tutorial https://jeevatamil.medium.com/how-to-create-share-sheet-uiactivityviewcontroller-in-swiftui-cef64b26f073 to add a simple share sheet to my swiftui app. It works properly on iPhones but crashes on iPad with this…
Boeggles
  • 59
  • 1
  • 6
7
votes
1 answer

ActionSheet on iPad not showing properly SwiftUI

I am trying to let my users choose Take a photo or pick from library in an ActionSheet It works well on Iphone but not on Ipad On Ipad : ActionSheet is at the top of screen, and not readable... All questions I read about this problem on…
Clément Tengip
  • 618
  • 6
  • 19
7
votes
8 answers

programmatically stop uipickerview animation on iphone

I have a UIActionSheet containing a picker and a UIToolbar. On the UIToolBar there is a save button. However, some of my users reported pressing the save button before the UIPickerView stops spinning thus only retrieving the initial value (before…
zsniperx
  • 2,732
  • 6
  • 25
  • 32
7
votes
0 answers

UIPopoverPresentationController : ActionSheet position at barButtonItem (iPad)

I have an UIAlertController (UIAlertControllerStyleActionSheet) on iPhone which now should be presented in a UIPopoverPresentationController on the iPad version.. I am doing the following: UIPopoverPresentationController *popover =…
Laurenz Glück
  • 1,762
  • 3
  • 17
  • 38