Questions tagged [uialertviewdelegate]

The `UIAlertViewDelegate` protocol defines the methods a delegate of a `UIAlertView` object should implement. The delegate implements the button actions and any other custom behavior. Some of the methods defined in this protocol are optional.

The UIAlertViewDelegate protocol defines the methods a delegate of a UIAlertView object should implement. The delegate implements the button actions and any other custom behavior. Some of the methods defined in this protocol are optional. On UIAlertViewDelegate, you can find the following methods:

Responding to Actions

  • alertView:clickedButtonAtIndex:

Customizing Behavior

  • alertViewShouldEnableFirstOtherButton:
  • willPresentAlertView:
  • didPresentAlertView:
  • alertView:willDismissWithButtonIndex:
  • alertView:didDismissWithButtonIndex:

Canceling

  • alertViewCancel:
60 questions
0
votes
2 answers

Notification or delegate called when UIAlertView is hidden/removed

I am trying to find what delegate/protocol or even notification is called when an alert view is hidden or shown. Do these events trigger a notification or callback that I can listen for? I know the UIAlertView protocol, but that's not what I am…
0
votes
2 answers

UIAlertView's delegate's method "clickedButtonAtIndex" not called when alert is dismissed in UI Automation test

I have a controller that creates and displays an alert when a user clicks a button ["Delete"]. The alert view prompts the user for confirmation, and either cancels the deletion, or completes the operation. When I run the code in my iPhone or even…
0
votes
3 answers

What is wrong with my UIAlertView delegate method?

I'm pretty new to Objective-C so hopefully this all makes sense. Here after authentication of user name and password fields the UIAlertView pops up. What I want is when the user presses the UIAlertViewButton. The Control should navigate to…
user3239274
  • 29
  • 1
  • 1
  • 5
0
votes
1 answer

when i set delegate.self in uialertview application is crash in arc

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Order" message:@"Order Successfully Discontinued." delegate:self …
0
votes
3 answers

UIAlertview won't log result

I want to log if the user pressed OK on my alertView, but it's doing nothing... This is my check: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 0) { NSLog(@"user pressed OK");…
Joran Den Houting
  • 3,149
  • 3
  • 21
  • 51
0
votes
1 answer

how to show a alert box in a delegate method (User defined) in Xcode?

I have written a function named as register which connects with the server and calls register done method (if connection established successfully) which is a delegate method,now here i am trying to display alertbox but the UI gets stucked and the…
-1
votes
4 answers

Issue with tap over keyboard's return key for UIAlertView's UIAlertViewStyleSecureTextInput field iOS 8

While tapping over keyboard's return key while entering value in UIAlertViewStyleSecureTextInput of a UIAlertView is triggering call to alertView:clickedButtonAtIndex: UIAlertViewDelegate in iOS 8 In iOS 7 same UIAlertViewDelegate call wasn't…
Satish
  • 2,015
  • 1
  • 14
  • 22
-1
votes
1 answer

About changing the UIAlertview GUI

Yesterday I use UIAlertViewDelegate... What is the difference between them : -(void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex -(void)alertView:(UIAlertView *)alertView…
user3891540
-1
votes
1 answer

How to format currency for a textfield in a UIAlertview

I want to add format currency for a textfield in a UIAlertview. However, I don't have any solution about this. Can you help me if you know solution? Thanks
iOS dev
  • 35
  • 1
  • 6
-1
votes
2 answers

Incorrect uialertiview

I have code that shows a uialertview with a long message: alert = [[UIAlertView alloc] initWithTitle:@"looong text" message:@"text to loong" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; alert.alertViewStyle =…
Yury Lego
  • 21
  • 1
  • 5
-1
votes
2 answers

UIAlertView delegation - return button index to calling method

Not sure if I worded that question correctly. Is there a way to have the button index selected in a UIAlertView returned to the method where the UIAlertView was initiated in? So - (void) someMethod { UIAlertView* alert = [[UIAlertView alloc]…
PruitIgoe
  • 6,166
  • 16
  • 70
  • 137
-2
votes
3 answers

UIAlertview Delegate Method not calling in Child View Controller

I have two controllers VC A -> Parent and VC B -> Child Alert view delegate method i.e func alertView(View: UIAlertView!, clickedButtonAtIndex buttonIndex: Int){} is declared in VC A. When i display alert from VC B delegate method is not called on…
Aabid Khan
  • 27
  • 1
  • 7
-2
votes
1 answer

Why is the UIAlertView not blocking until user responds by tapping a button?

In my iOS 7 app, I need to verify the user wants to deleta a selected record from Cord Data. I have the UIAlertViewDelegate defined in the .h file. This is the code to display the alert: UIAlertView *alert = [[UIAlertView alloc]…
SpokaneDude
  • 4,856
  • 13
  • 64
  • 120
-2
votes
3 answers

how to get UIAlertView otherButtons' title?

-(void) alertView: (UIAlertView *) alertVw clickedButtonAtIndex:(NSInteger)buttonIndex { NSString *str = [NSString stringWithFormat:@"%d 。", buttonIndex]; UIAlertView *newAlertVw = [[UIAlertView alloc] initWithTitle:@"INFO" message:str…
ibamboo
  • 1,467
  • 13
  • 15
-3
votes
4 answers

UIAlertview clicked button at index delegate method not being called

Am new to AlertViews with actions. Have set mine up as in the examples I found here including setting the delegate method in my .h, but when I debug find that it is not reaching my clickedButtonAtIndex method. Probably missing something simple :-/…
Kitcc
  • 2,138
  • 4
  • 24
  • 42
1 2 3
4