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
24
votes
5 answers

iOS UIAlertView button to go to Setting App

Is there a way to have the button of a UIAlertView go to the Settings App for the specific App calling it? Thanks
M Jesse
  • 2,213
  • 6
  • 31
  • 37
24
votes
6 answers

How do you pass a variable to the UIAlertView delegate?

How do you pass a variable to the UIAlertView delegate? I have a variable that I want to use in the alert view delegate. It is only used in the function that shows the UIAlertView and the UIAlertView delegate, so i don't think it should be a…
wusher
  • 12,291
  • 22
  • 72
  • 95
23
votes
6 answers

Detecting button click with UIAlertView

I am trying to call and alert when a button is pressed. i use this : -(IBAction)Add { UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"add button pressed" message:@"Add to record" …
Stefan
  • 303
  • 1
  • 3
  • 7
22
votes
4 answers

iOS dismiss UIAlertView beforing showing another

I have a Utils class which shows UIAlertView when certain notifications are triggered. Is there a way to dismiss any open UIAlertViews before showing a new one? Currenty I am doing this when the app enters the background using [self…
booboo-a-choo
  • 779
  • 2
  • 8
  • 14
22
votes
7 answers

How can I show alertview with activity indicator?

I want to show alertview with message: "Loading data" and spinning activity indicator. How can I do this?
Voloda2
  • 12,359
  • 18
  • 80
  • 130
22
votes
7 answers

Attempt to present UIAlertController on View Controller which is already presenting (null) [Swift]

I have an alert view that I am trying to present on a photo view. The photos are displayed in a list and can be pushed to a full-screen view. The photo view is being displayed programmatically. I think that is what is causing the issue because the…
Miles
  • 625
  • 2
  • 9
  • 18
22
votes
10 answers

How do I validate TextFields in an UIAlertController?

Can anyone tell me how to validate UITextFields inside of a UIAlertController? I need it to prevent the user from clicking "Save" unless both fields are entered. Here is my code so far: @IBAction func btnStart(sender: AnyObject) { var alert =…
MarkoDeveloper
  • 287
  • 1
  • 3
  • 11
22
votes
9 answers

Is it possible to show an Image in UIAlertView?

Is it possible to add image in an UIAlertView, like showing an image from the plist file?
summer
  • 269
  • 1
  • 4
  • 11
22
votes
6 answers

How to add subview inside UIAlertView for iOS 7?

I am having an application on iTunes store which displays some UILabel and UIWebView on UIAlertView. According to session video, addSubView for UIAlertView will not work. They have talked about ContentView. But in the GM Seeds SDK, I could not find…
Apurv
  • 17,116
  • 8
  • 51
  • 67
21
votes
8 answers

How to write event handlers for buttons in UIAlertView?

Say I have a alert view like follows in obj c UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"title" message:@"szMsg" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:@"download"]; [alert show]; [alert release]; Now…
Ravi
  • 1,759
  • 5
  • 20
  • 38
21
votes
3 answers

Where to find a clear explanation about swift alert (UIAlertController)?

Couldn't find a clear and informative explanation for this.
Nikita Kurtin
  • 5,889
  • 4
  • 44
  • 48
19
votes
2 answers

How can I dismiss UIAlertView?

How can I dismiss UIAlertView ? This code doesn't work. @property (nonatomic, retain) UIAlertView *activityAlertView; - (void)viewDidLoad { self.activityAlertView = [[UIAlertView alloc] initWithTitle:@"Receiving data" message:@"\n\n" …
Voloda2
  • 12,359
  • 18
  • 80
  • 130
19
votes
6 answers

How to close the SideBar menu manually when using SWRevealViewController ( ios)

I am trying to implement a SideBar / slide out menu using the SWRevealViewController. I have a bunch of menus. One of the menu is to get app version info. So When I click on the cell, An AlertView displays the version number and on pressing the OK…
moni_sind
  • 605
  • 1
  • 5
  • 15
19
votes
3 answers

How to change button text color of UIAlertView in iOS7?

iOS7 introduced general tint-color. I think UIAlertView is also in the valid range, but actually tintColor doesn't look to work with UIAlertView. (for tappable button text color) Is it possible to change the tint-color of alert view? If possible,…
eonil
  • 83,476
  • 81
  • 317
  • 516
19
votes
5 answers

How to make a multiple line, left-aligned UIAlertView?

I am interested in making a left-aligned UIAlertView with several lines like a bulletin list that would look like the following: line 1 line 2 line 3 Here's what I have so far: alert = [[UIAlertView alloc] initWithTitle: @"How to use buttons" …
DavidNg
  • 2,826
  • 6
  • 32
  • 45