Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't set UIAlertview events?
    primarykey
    data
    text
    <p>I can't set action event for alertview. Here when I click the alertview button it can't be actioned. What's the problem in my code.</p> <p>Here is my code :</p> <pre><code>-(IBAction)savebuttons { if([username.text isEqualToString:@""] &amp;&amp; [password.text isEqualToString:@""] &amp;&amp; [emailid.text isEqualToString:@""] &amp;&amp; [phonenum.text isEqualToString:@""] &amp;&amp; [address.text isEqualToString:@""] &amp;&amp; [city.text isEqualToString:@""] &amp;&amp; [state.text isEqualToString:@""] &amp;&amp; [country.text isEqualToString:@""] &amp;&amp; [zipcode.text isEqualToString:@""]) { UIAlertView *view = [[UIAlertView alloc] initWithTitle:@"Warning" message:@"Please enter all the details" delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [view show]; [view release]; } else if([username.text isEqualToString:@""]) { views = [[UIAlertView alloc] initWithTitle:@"Email ID" message:@"Email ID cannot be blank" delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; views.tag=1; [views show]; [views release]; } else if([password.text isEqualToString:@""]){ UIAlertView *view = [[UIAlertView alloc] initWithTitle:@"Password" message:@"Password cannot be blank" delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; view.tag=2; [view show]; [view release]; } else { ..... ...... } - (void)alertView:(UIAlertView *)alertViews clickedButtonAtIndex:(NSInteger)buttonIndex { if(alertViews.tag == 1) { if(buttonIndex == 0) { [username becomeFirstResponder]; NSLog(@"Username"); } } if(alertViews.tag == 2) { if(buttonIndex == 0) { [password becomeFirstResponder]; NSLog(@"Password"); } } </code></pre> <p>I have only one button for alertview like "OK". But it's not responding. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload