Questions tagged [uialertview]

UIAlertView, a class contained in Apple's UIKit framework, was used to display an alert to the user. Alerts could have a title, message, several buttons, and custom subviews. UIAlertView was deprecated in iOS 8.

UIAlertView, a class contained in Apple's UIKit framework, was used to display an alert to the user. Alerts could have a title, message, several buttons, and custom subviews. UIAlertView was deprecated in iOS 8 and replaced with UIAlertController.

Use the properties and methods defined in this class to set the title, message, and delegate of an alert view and configure the buttons. You must set a delegate if you add custom buttons. The delegate should conform to the UIAlertViewDelegate protocol. Use the show method to display an alert view once it is configured.

Resources:

2558 questions
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,734
  • 6
  • 62
  • 104
18
votes
2 answers

UIAlertView Causes Crash in iOS SDK 6.0

I recently submitted an app to App Store that has not been accepted yet. Meanwhile, I downloaded Xcode 4.5 and tested my app in iPhone 6.0 Simulator. However, when I intend to show an UIAlertView, the app crashes on [myAlertView show] line with…
kubilay
  • 5,047
  • 7
  • 48
  • 66
17
votes
5 answers

Getting text from UIAlertView

I'm trying to get text from an alert view and add it to my mutable array to list in a table view. I realize there is a similar question that was posted a few months ago, but I dont understand how to utilize the given answer. -(IBAction)insert { …
Snowman
  • 31,411
  • 46
  • 180
  • 303
17
votes
7 answers

Alternative to UIAlertView for iOS 9?

UAlertView is deprecated in iOS 9 and later. What would be an alternative? UIAlertView *new = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Your InApp Purchases were successfully restored" delegate:nil cancelButtonTitle:@"OK"…
user3138007
  • 637
  • 1
  • 6
  • 19
17
votes
3 answers

UIAlertAction handler running after delay

I'm trying to change my UIAlertViews to UIAlertControllers. I set up this action for it: UIAlertAction *undoStopAction = [UIAlertAction actionWithTitle:@"Undo Stop" …
17
votes
3 answers

Swift: Insert Alert Box with Text Input (and Store Text Input )

In one of my viewController, I want to make an alert box appear that prompts the user to type this information.Then, I want the user to store this input using NSUserDefaults. How can I achieve this? Thank you in advance!
l-spark
  • 871
  • 2
  • 10
  • 25
17
votes
3 answers

Trying to dismiss UIAlertController with unknown presenter

My application crashed, and it must be because of UIAlertController. This issue occurs only on iOS 8.x where UIAlertController is available. The strange fact is that my application does not use UIAlertViewController nor UIAlertView. The reports…
Gabriele
  • 1,163
  • 1
  • 11
  • 24
17
votes
4 answers

Customize UIAlertController in iOS 8 to include standard elements like UITableView

I am used to customize UIAlertViews through the [alert setValue:someView forKey:@"accessoryView"] method. This creates customizable content for UIAlertViews with custom heights. However it only works on iOS7 and down. In iOS8 the UIAlertController…
kbjeppesen
  • 335
  • 1
  • 3
  • 9
17
votes
3 answers

UIAlertView: UIAlertViewStyleSecureTextInput: Numeric keyboard

I'm currently using this UIAlertView to do a login popup, UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Restricted" message:@"Please Enter Code to Enable Fields" …
Jason Rogers
  • 19,194
  • 27
  • 79
  • 112
16
votes
5 answers

Multiple UIAlertView; each with their own buttons and actions

Im creating a view in Xcode 4.3 and im unsure how to specify multiple UIAlertView's that have their own buttons with separate actions. Currently, my alerts have their own buttons, but the same actions. Below is my code. -(IBAction)altdev { …
DiscoveryOV
  • 1,045
  • 2
  • 9
  • 24
16
votes
5 answers

How to add userInfo to a UIAlertView?

I would like to know how to add a userInfo object, or any NSDictionary, to a UIAlertView? Thank you.
aLt
  • 218
  • 2
  • 7
16
votes
10 answers

Concurrent UIAlertControllers

I'm porting my app to iOS 8.0 and notice that UIAlertView is deprecated. So I've changed things to use a UIAlertController. Which works in most circumstances. Except, when my app opens, it does several checks to report various states back to the…
Fittoburst
  • 2,215
  • 2
  • 21
  • 33
15
votes
4 answers

Display Alert Message from viewDidLoad

I want to display a alert message from viewDidLoad() method of ViewController.m instead from viewDidAppear() method. Here is my code : - (void)viewDidLoad { [super viewDidLoad]; //A SIMPLE ALERT DIALOG UIAlertController *alert = …
Shivani Arorra
  • 161
  • 1
  • 1
  • 5
15
votes
1 answer

iOS: Custom permission alert view text

Anyway to custom permission alert view like: Contacts, Photo Album, Push Notifications... before they get access, they will pop up an alert view like this: How to custom Contacts, photo album, push notifications alert view text? UPdate: See the…
Jason Zhao
  • 1,278
  • 4
  • 19
  • 36
14
votes
3 answers

UIAlertView easy way to tell if cancel button is selected

I know I've done this before but I just can't figure it out again. What is the method I would use to see if a cancel button was pressed. I don't want to do it based on the button index. There is a way to do it, something like: [alertView…
CodeGuy
  • 28,427
  • 76
  • 200
  • 317