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
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
  • 285
  • 1
  • 3
  • 13
14
votes
2 answers

UIAlertAction with different color button text

I am trying to create an UIAlertAction that has black color text for the first button and blue for the second. If I change the tint then all go black but i can't change the first button to black without it. Below is my code: let alert =…
user1079052
  • 3,803
  • 4
  • 30
  • 55
14
votes
2 answers

UIAlertAction completion block not called - iOS

I have an iOS app with a UIAlertController in the form of a action sheet being presented in my app when the user taps on a button. It all works great, apart from one thing, the completion blocks don't get called for some reason. Here is my code: //…
Supertecnoboff
  • 6,406
  • 11
  • 57
  • 98
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
  • 70,108
  • 23
  • 141
  • 204
13
votes
3 answers

ios UIActionSheet cancel button doesn't work right

I have this problem: here is my code: UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Share the race" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Send with mail" otherButtonTitles:nil]; …
ghiboz
  • 7,863
  • 21
  • 85
  • 131
13
votes
2 answers

Keyboard hide and show again right after UIActionSheet dismiss in iOS 7, SDK 7

I create an UIActionSheet in my ViewController. I also add code to catch UIKeyboardWillShowNotification and UIKeyboardWillHideNotification notification. My problem is when I dismiss, I get two notification keyboard hide and show again. Somebody can…
huynguyen
  • 7,616
  • 5
  • 35
  • 48
12
votes
6 answers

UIActionSheet cancel button not dismissing actionsheet

I have an UIActionSheet and I am specifying the cancel button however it does not dismiss when its tapped? UIActionSheet *actionSheet = [[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel"…
TheLearner
  • 19,387
  • 35
  • 95
  • 163
12
votes
11 answers

How to make a uiactionsheet dismiss when you tap outside eg above it?

How do i make a uiactionsheet dismiss when you tap outside eg above it? This is for iPhone. Apparently the ipad does this by default (I may be wrong).
Chris
  • 39,719
  • 45
  • 189
  • 235
12
votes
3 answers

Problems with Cancel Button and UIActionSheet

How do I determine if the cancel button was pressed on a UIActionSheet? My UIActionSheet is set up like this: -(IBAction)fileButtonPressed { UIActionSheet *mymenu = [[UIActionSheet alloc] initWithTitle:@"Select…
iphaaw
  • 6,764
  • 11
  • 58
  • 83
12
votes
2 answers

UIActionSheet in swift puts Cancel button top in iOS 7

I am in the process of rewriting my app from objective c to Swift and I noticed that UIActionSheet behaves differently in Swift version than in obj-c version. Obj-c version Swift version This is a problem only on iOS 7, it works fine (meaning the…
Lope
  • 5,388
  • 4
  • 30
  • 40
12
votes
3 answers

UIActionSheet is clipped by its superview, I don't have a toolbar or tabbar

My app uses a UINavigationController, but I do not show the toolbar because all of my navigation is controlled by in-game controls. I do not have a Tab bar, because I'm not using a TabBarController. My game app is Landscape only. This is how I…
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
11
votes
2 answers

How to change sequence of button in UIActionsheet in iPhone?

I have 4 buttons in UIActionsheet from Top to Bottom Sequence is as below 1. Remove existing photo - Destructive button title 2. take picture - other button title 3. choose from library - other button title 4. Cancel - cancel button title Now…
dks1725
  • 1,631
  • 1
  • 20
  • 29
11
votes
4 answers

Password protect iPhone app

I'm starting a new app, and I'd like to know how to require a password to open it. I was considering a UIActionSheet in the application didFinishLaunchingWithOptions method of the app delegate implementation file, but am unsure how to go about…
Thomas
  • 5,810
  • 7
  • 40
  • 48
11
votes
2 answers

ActionSheetPicker replacement for ios 8

In iOS 7 have been using ActionSheetPicker to let the user to select a choice and it has been working great until I installed Xcode beta 2 and ran my project in iOS 8. Is there a way to do this in iOS 8? Screenshots:…
11
votes
1 answer

Custom UIActionSheet for iOS

Is it possible to create an action sheet that looks like the attached image for iOS? This is the screenshot from the Photo app on iOS6, when you press the action button. I really like the way the options are listed as their icons, rather than…
BlueChips23
  • 1,861
  • 5
  • 34
  • 53