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
1 answer

UIAlertController - iOS 8 - iPad - Not Centering Properly

I'm trying to display a UIAlertController with some action buttons. It works fine on the iPhone, because it pops from the bottom of the device. I have a problem with the ipad, the UIAlertController does not center properly. It shows a bit off to the…
TheRealRonDez
  • 2,807
  • 2
  • 30
  • 40
0
votes
1 answer

How to make ok button active in UIAlertviewController?

I am getting an error when I start typing text in a UITextfield: unrecognized selector sent to instance var inputTextField: UITextField! let alertController = UIAlertController(title: "User Name", message: "Enter your new ideatrr name",…
0
votes
1 answer

Alert button action not working in swift

I have a alerviewcontroller with multiple buttons . These buttons are created based on a array value . My code is given below and the button action dont work properly. var alert : UIAlertController = UIAlertController(title: "Select student",…
azhar
  • 1,709
  • 1
  • 19
  • 41
0
votes
1 answer

Autolayout bug with UIAlertView/Controller?

I am trying to switch the Autolayout constraints of my project for each orientation and am doing so by programmatically removing and adding a portrait and landscape set of NSAutoLayoutConstraints. I have the correct auto layout constraints (I think)…
ansonl
  • 786
  • 1
  • 13
  • 34
0
votes
2 answers

How to use UIAlertController() as global variable on iOS7 compatible devices?

let alertControllerLoad = UIAlertController() let alertViewLoad = UIAlertView() These are both established as global variables in my inbox class. I check if the device is iOS8 or above before I call UIAlertController but since it creates an…
user4620095
0
votes
1 answer

Duplicate email Alert Swift + Parse

I'm trying to have it so when a user creates an account... if their email hasn't been used before an Alert box appears saying "Account created" and if the email is already in created (on Parse) then an alert should appear notifying the user. I…
user5034511
0
votes
1 answer

UIAlertController not showing when pressing navigation bar button, although console indicates activity?

So I have a map search function that has a text field. I set up an UIAlertController there, and it works fine, i.e. it brings up an alert when there's not location nearby. I have a current location button, but I want to perform action only if the…
0
votes
0 answers

Negative CGRectMake coordinates? Swift

I have a UIImageView that I'm adding to a UIAlertController. I want the image view to be smack dab in the middle of the screen, but when toying around with the CGRectMake coordinates, I'm finding that my y value only appears on screen if given a…
slider
  • 2,736
  • 4
  • 33
  • 69
0
votes
1 answer

How to to preload all tableView cells before pushing his view controller SWIFT

I have an UITableViewController with a list of posts. When I press on a cell, I would display an alertController during the post image and post comments downloading. Then dismiss the alertController and push the UIViewController of the post…
cmii
  • 3,556
  • 8
  • 38
  • 69
0
votes
1 answer

Updaters NSUserDefaults from alert action

I'm trying to setup a alert view that the user will type their salary into a text-field in the alert view, and then the NSUserdefault will update when the user clicks the done button. I'm getting an error when putting the code in the completion…
user3275730
  • 25
  • 1
  • 6
0
votes
1 answer

UIAlertController doesn't display and crashes/freezes app in iOS8

I am trying to create a button on my app that when pressed will ask the user whether or not they want to add a picture by taking it or by choosing an existing photo from their library. I have been searching all over for the past few days and I have…
JJ Stamp
  • 121
  • 2
  • 13
0
votes
2 answers

UIAlertController error 'bounds' not found on object of type '__strong id'

I am trying to create an alert that when brought up will ask the user if they want to select a photo from their library or take a photo. I am working off of a template from the post UIPopover How do I make a popover with buttons like this?. The…
JJ Stamp
  • 121
  • 2
  • 13
0
votes
1 answer

How to get the title of the selected UIAlertController of type action sheet for iOS 8.0+ into a label?

I have created a drop down with text and button, when the drop down button is clicked the data is populated in the UIAlertController of type action sheet. Now to replicate drop down behavior need to set the text of textfield as the clicked…
RPP
  • 55
  • 6
0
votes
1 answer

How to get Application Interface outside of a ViewController?

I have two files .h and .m with some util methods to be called from viewcontrollers. I have one with an alertview, which when the ok button is clicked, the app would terminate. I will use the next code to exit, after user click the…
0
votes
1 answer

trying to do a rate us UIAlertController

Whenever I run my app the following error is called Warning: Attempt to present "The alert" on "MenuViewController" whose view is not in the window hierarchy! what exactly does this mean and how do I fix it? I only have one UIViewController and here…
Matt
  • 89
  • 7
1 2 3
99
100