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
22
votes
4 answers

Change Action sheet popover arrow in iOS8

i'm using UIAlertController . But on iPad with iOS 8, actionSheet show with popover arrow. Any ideas to hide that arrow? Here is my code: UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"this is alert controller"…
TienLe
  • 587
  • 2
  • 7
  • 33
20
votes
2 answers

How to add a button to an existing UIActionSheet?

I have this code: UIActionSheet *actionSheet = [[[UIActionSheet alloc] initWithTitle:@"Illustrations" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil …
Olie
  • 23,933
  • 18
  • 92
  • 129
19
votes
8 answers

How to fire uibarbuttonitem click event programmatically

I have created a UIActionSheet UIActionSheet * action = [[UIActionSheet alloc]initWithTitle:@"" delegate:self cancelButtonTitle:…
Jean Paul Scott
  • 2,229
  • 4
  • 25
  • 37
19
votes
7 answers

How to customize UIActionSheet? iOS

Is it possible to create an ActionSheet that have a label between two buttons like this image?
caribbean
  • 728
  • 1
  • 9
  • 27
19
votes
2 answers

UIPopover How do I make a popover with buttons like this?

I'm wondering how I can create a popover with buttons like this. ANSWER: UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle: nil delegate: self …
ManOx
  • 1,855
  • 5
  • 23
  • 37
18
votes
1 answer

Using UIActionSheet on iPad

Apple's documentation for the UIActionSheet is causing me confusion. First off, in the iPad Human Interface Guidelines, it says : To learn more about using an action sheet in your code, see “Using Popovers to Display Content” in iPad Programming…
GendoIkari
  • 11,134
  • 6
  • 58
  • 100
16
votes
5 answers

Android equivalence of iOS ActionSheet

What is the Android equivalence of the UIActionSheet in the iOS SDK? I am working on a React-Native project and need to maintain the use of native controls where possible. I have not come across an npm package or other that makes use of the…
pnizzle
  • 5,359
  • 3
  • 38
  • 70
16
votes
7 answers

Accessing UIPopoverController for UIActionSheet on iPad

On the iPad, one can show a UIActionSheet using -showFromBarButtonItem:animated:. This is convenient because it wraps a UIPopoverController around the action sheet and it points the popover's arrow to the UIBarButtonItem that is passed in. However,…
westsider
  • 4,929
  • 5
  • 33
  • 51
15
votes
1 answer

UIDatePicker in UIActionSheet on iPad

In the iPhone version of my app, I have a UIDatePicker in a UIActionSheet. It appears correctly. I am now setting up the iPad version of the app, and the same UIActionSheet when viewed on the iPad appears as a blank blank box. Here is the code I am…
Chris
  • 5,199
  • 15
  • 61
  • 124
15
votes
7 answers

Change the color of cancel button in UIAlertController with preferredStyle: .ActionSheet

Is it possible to change the color of cancel button to red , i know we can by using Destructive style let cancelActionButton: UIAlertAction = UIAlertAction(title: "Cancel", style: .Destructive) { action -> Void in print("Cancel") …
bikram sapkota
  • 946
  • 1
  • 11
  • 17
15
votes
2 answers

Xcode iPad UIActionSheet with many buttons do not correctly displayed iOS7

On the iPad new ios 7 UIActionSheet is not correctly displayed with lots of buttons. Not cleaning background of UIActionSheet on scrolling. The buttons seem frozen in background UIActionSheet. screenshot with problem My code : UIActionSheet…
Constantinus
  • 171
  • 1
  • 5
15
votes
1 answer

Bringing up a UIPickerview rather than keyboard input iOS

Basically I would like to have the user click in the text field and it bring up a populated pickerview rather than a keyboard. This would also need a toolbar with a done button as well Im presuming. I currently have the field set as an output and…
JohnV
  • 275
  • 1
  • 3
  • 13
14
votes
1 answer

UIActionSheet deprecated on iOS8

I want to use UIActionSheet for iOS8 but it's deprecated and I don't know how to use the updated way to use this... See the old code: -(void)acoesDoController:(UIViewController *)controller{ self.controller = controller; UIActionSheet…
denisb411
  • 482
  • 1
  • 3
  • 21
14
votes
3 answers

How to customize UIAlertController with UITableView or is there any default control available like this UI in Pages app?

I would like to implement a UIAlertViewController like this (Reference: Pages and Keynote app): . I have implemented a custom tableview and presented the view by mimicking the UIAlertViewController. But I cannot achieve a similar UI as above. Is…
SMS
  • 588
  • 1
  • 9
  • 21
14
votes
2 answers

Retain/release pattern for UIPopoverController, UIActionSheet, and modal view controllers?

I'm somewhat unclear on the object ownership patterns required for the following instances. When my UIViewController presents a popover controller, an action sheet, or another view controller as modal, am I required to hang onto a retained reference…
Ben Zotto
  • 67,174
  • 23
  • 136
  • 201
1 2
3
66 67