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
33
votes
2 answers

Xcode : sharing content via Action Sheet

I would like to replicate this behaviour (see image below) and share contents from my app using this kind of action sheet. The question is: Is this really an Action Sheet? I can't find anywhere tutorial for iOS 7 or 8. Not sure how to proceed. Do…
Miwi
  • 774
  • 4
  • 15
  • 27
33
votes
10 answers

How to change the background color of the UIAlertController?

Due to strange behavior of UIActionSheet in iOS 8, I have implemented UIAlertController with UIAction as buttons in it. I would like to change the entire background of the UIAlertController. But I can't find any ways to do it. Tried even…
GJDK
  • 693
  • 2
  • 7
  • 17
33
votes
8 answers

Showing a UIPickerView with UIActionSheet in iOS8 not working

Showing a UIPickerView with UIActionSheet in iOS8 not working The code works in iOS7, however it is not working in iOS8. I'm sure it is because UIActionSheet is deprecated in iOS8 and Apple recommends to use UIAlertController. However, how to do it…
32
votes
12 answers

Dismissing UIAlertViews when entering background state

Apple recommends dismissing any UIAlertViews/UIActionSheets when entering background state in iOS 4. This is to avoid any confusion on the user's part when he relaunches the application later. I wonder how I could elegantly dismiss all UIAlertViews…
François P.
  • 5,136
  • 4
  • 30
  • 31
31
votes
2 answers

Social action sheet (like on iOS 6)

on iOS 6 a change was that when you want to share something it brings up an action sheet similar to this: I have seen a few other apps that use this, is there a native way to do this without making a custom action sheet? Thanks!
MCKapur
  • 9,029
  • 9
  • 56
  • 99
29
votes
1 answer

UIActionSheet on iPad is not showing cancel button

I am trying to show cancel button in UIActionSheet but it's not showing, is that an acceptable behavior? please advice. UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure you want to clear the cache?" …
Ahmad Kayyali
  • 8,236
  • 13
  • 47
  • 83
28
votes
3 answers

UIAlertController handle dismiss upon click outside (IPad)

Previous to iOS8 we used the UIActionSheet for showing alert and now we need to use the UIAlertController. When we used the UIActionSheet we could easily handle situations where the user clicked outside the pop up (which means he want to cancel the…
Tomer Peled
  • 3,472
  • 4
  • 30
  • 51
26
votes
0 answers

UIActionSheet centralisation on rotation

A number of others have asked this question, but it's never been answered. The problem seems trivial and yet it hasn't been addressed in Apple's documentation or elsewhere. I'm presenting my UIActionSheet instance using the showInView method: …
Vinod Vishwanath
  • 5,413
  • 2
  • 24
  • 39
25
votes
5 answers

UIActionSheet buttonIndex values faulty when using more than 6 custom buttons?

I have discovered a strange problem when using UIActionSheet on the iPhone (iOS 4.2). Consider this code: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self.window…
huesforalice
  • 2,263
  • 2
  • 21
  • 29
25
votes
5 answers

iOS 8 UIActionSheet ignores view controller supportedInterfaceOrientations and shouldAutorotate

I have an application that is configured via the plist file to support portrait, landscape left, and landscape right orientations (i.e. UISupportedInterfaceOrientations is set to UIInterfaceOrientationPortrait, UIInterfaceOrientationLandscapeLeft,…
Awesomeness
  • 643
  • 8
  • 14
25
votes
10 answers

Display UIAlertController from UIView/NSObject class

I have working iOS application In order to support iOS8, I am replacing UIAlertView/UIActionSheet with UIAlertController. Problem : For display UIAlertController I need presentViewController method of UIViewController class. But UIAlertView is…
Jageen
  • 6,185
  • 2
  • 33
  • 54
24
votes
3 answers

last Button of actionsheet does not get clicked

I have used an actionsheet in my project and when it appears it show all buttons but last (4th) button does not responds to my click(only it's half part responds).. I know the reason it is because i have used a TabBarController and the present class…
Ranjeet Sajwan
  • 1,888
  • 2
  • 28
  • 60
23
votes
6 answers

Action sheet doesn't show Cancel button on iPad

On the iphone, this code shows the cancel button: - (IBAction)buttonPressed { UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure?" delegate:self …
user250781
22
votes
4 answers

how to display only time in UIDatePicker iphone

In my app i am displaying a UIDateTimePicker in action sheet through code. it is working fine. But i don't want to display date and day.How this can be done. Please help. Thanks in advance. code: UIActionSheet *actionSheet = [[UIActionSheet alloc]…
ishhhh
  • 637
  • 2
  • 11
  • 29
22
votes
3 answers

UIActionSheet Change arrow position?

To show a UIActionSheet on the iPad I did this: [actionSheetX showFromRect:RectX inView:myView animated:YES]; The arrow of the popover points down, can I change this position to point left, up or right, like when using a normal popover?
lbadias
  • 221
  • 2
  • 4
1
2
3
66 67