Questions tagged [uialertcontroller]

An iOS class, for displaying alerts and popup style selectors. Note that the legacy `UIActionSheet` and `UIAlertView` tags would not generally be used now.

In iOS, UIAlertController displays an alert message to the user, or, an action selector. (On iPhone, it's the large selector which appears from the bottom of the screen, usually with two or three choices.)

After configuration, it is presented using UIViewController.present. In the action sheet case, actions are added using UIAlertController.addAction.

This class replaced the older UIActionSheet and UIAlertView.

Apple UIAlertController Documentation

1683 questions
0
votes
0 answers

Error when putting value from a button

The code is working just fine on simulator iphone6, iphon5 and device iphone 5s, throw this error on a device iphone 5c, have no idea why, try to dig into it looking on google and stuff but there was not much explanation about the error itself so…
thibaut noah
  • 1,474
  • 2
  • 11
  • 39
0
votes
1 answer

Having some trouble checking if textfield within alert box is empty

So for a bit now i have been trying to figure this out with no luck. What i am trying to do goes like this... Action sheet pops up and option is tapped which brings up an alert box Textfield in alert box asks to name a deck Name is entered,"OK" is…
ACerts
  • 308
  • 1
  • 6
  • 22
0
votes
2 answers

UIAlertController Warning Message

I am using the below code for UIAlertController in my project. if([[[UIDevice currentDevice] systemVersion]floatValue] >= 8.0){ UIAlertController * alert= [UIAlertController …
0
votes
1 answer

UIPickerView in UIAlertController give error in iPad only while correct in iPhone?

i use the following code for alert view and it work in iPhone. but when i run it in iPad it give the following error: Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController () of…
ibad ur rahman
  • 1,381
  • 4
  • 18
  • 40
0
votes
1 answer

uialertcontroller with uipickerview in swift iOS?

i want to show UIPickerView in UIAlertController. i do it successfully but display of alert view is wrong. below is alert view code. let alertView = UIAlertController(title: "Select Launguage", message: "", preferredStyle:…
ibad ur rahman
  • 1,381
  • 4
  • 18
  • 40
0
votes
1 answer

Method showing alert in App Delegate fails because it's rootViewController is not in the View Hierarcy

During development of my iOS application, I would like to be able to show the user a dialog if a serious bug occurs. on SO, found that this could be achieved with adding something like the following to my AppDelegate class - (void)…
Joakim
  • 3,224
  • 3
  • 29
  • 53
0
votes
1 answer

Check field validation in UIAlertController

I have UIAlertController with input field. I want to check if this field is not empty and if field text is number. But i don't understand how to show validation message in alert window. var inputTextField: UITextField? let…
Arti
  • 7,356
  • 12
  • 57
  • 122
0
votes
1 answer

Add item to segment controller from selecting an action from alert view controller

I had created a normal segment controller which has two category, category 1 and 2 respectively. Now I have add button, which push me to the new view controller to add an item. When clicking on done button for adding an item I have an alert…
shahin ali agharia
  • 1,629
  • 4
  • 21
  • 36
0
votes
1 answer

Xcode7 UIAlertController to get user data

I need some help with pulling up a custom alert from a bar button. The objective is to have the alert pop up asking the user to input the title and description. The alert is going to have two text fields, one for title and one for details, with a…
0
votes
2 answers

How to handle multiple UIAlertControllers in iOS?

I have to show multiple UIAlerts in one viewController before iOS8 we can use the UIAlerts with tags and we can identify in clickedButtonAtIndex using tags like. - (void)alertView:(UIAlertView *)alertView…
Logger
  • 1,274
  • 1
  • 14
  • 25
0
votes
1 answer

Get Apple UIAlertController completion when using StoreKit

I'm implementing a payment ViewController, where I want to present a loading view (spinner), whenever StoreKit is fetching some data. I add the loading view when the "Purchase" button is clicked, and removes it when func productsRequest(request:…
Nikolaj Simonsen
  • 1,650
  • 3
  • 18
  • 34
0
votes
1 answer

How to put large chunk of code in AlertController block (Swift)

In my collection view cell, I have a button which successfully saves the current user (PFUser) to an array of users of each event (which are the objects at index path). However, I would like to add an alert view, but have been unsuccessful in…
Echizzle
  • 3,359
  • 5
  • 17
  • 28
0
votes
1 answer

resetting a password with parse in swift

Okay, so how am I able to access "textField" at the end of the block where it is added? I tried creating a global property called "alertTextField" then set it to the textField in the block so I can access it in the other action but it doesn't seem…
Echizzle
  • 3,359
  • 5
  • 17
  • 28
0
votes
1 answer

Display a UIAlertController without any UIButton using Swift 2.0

I guess the answer is easy but I've been days trying to solve the problem and can not find the solution. This is a UIViewController after certain checks and without using any button, display a UIAlertController. Always appear Warning: Attempt to…
0
votes
0 answers

iOS UIAlertController code flow control

-(bool)textFieldShouldClear:(UITextField *)textField { UIAlertController * blert = [UIAlertController alertControllerWithTitle:@"your alert" message:@"are you sure you want to clear" preferredStyle:UIAlertControllerStyleAlert]; …
teamiOS
  • 11
  • 5