Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8050649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:07:52+00:00 2026-06-05T07:07:52+00:00

I have one UIAlertView containing one UITextField with ok and cancel button. When I

  • 0

I have one UIAlertView containing one UITextField with ok and cancel button. When I click on ok button i am calling webService. I want to return keyboard before calling webservice. Keyboard is not returning till response is not coming from webservice. Because of that half screen not visible to user during loading webservice. Here is my code which i did.

UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:@"Forgot Password" message:@"    " delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];

    // Adds a username Field
    alertEmailtextfield = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 29.0)]; 
    alertEmailtextfield.layer.cornerRadius = 07.0f;
    [alertEmailtextfield setBorderStyle:UITextBorderStyleRoundedRect];
    alertEmailtextfield.placeholder = @"Enter Email";
    [alertEmailtextfield setBackgroundColor:[UIColor whiteColor]]; 
    alertEmailtextfield.autocapitalizationType =UITextAutocapitalizationTypeNone; //For Making Caps Off
    [alertview addSubview:alertEmailtextfield];

[alertview show];


- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

    if (buttonIndex == 1) {

        if ([alertEmailtextfield.text length] != 0) {

            if (![self validEmail:alertEmailtextfield.text]) {

                [AlertView UIAlertView:@"Enter email is not correct"];

            }else{
                //[alertEmailtextfield resignFirstResponder];

                [NSThread detachNewThreadSelector:@selector(startSpinner) toTarget:self withObject:nil];

                Boolean isForgotPassword = [serverConnection forgotPassword:alertEmailtextfield.text];

                if (isForgotPassword) {

                    NSLog(@"Mail is send");

                    [AlertView UIAlertView:@"New password is send to your mail"];
                    [spinner stopAnimating];

                }else{

                    [AlertView UIAlertView:@"User does not exist"];
                    [spinner stopAnimating];
                }
            }
        }else{

            [AlertView UIAlertView:@"Text Field should not be empty"];
        }
    }
}

Please if any one knows how to return keyboard in UIAlertView’s UITextField, help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:07:53+00:00Added an answer on June 5, 2026 at 7:07 am

    Might be u are doing both task (webservice call and keyboard resinging) in same main thread so untill ur data is not loading from server keyboard is not resign from view. call weservice method in background thread like.

    -(void)alertView:(CustomAlert *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
    {
    [textField resignFirstResponder];
    UPdate
    [self performSelectorInBackground:@selector(yourWebservice) withObject:nil];

    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two UIAlertView's which are not displayed one after another. Both of the
I have an application , that has one mainviewcontroller with some button.When i click
I have one activity and want to display another inside it. Here's my layout:
Everybody, I need to set one image on UIAlertView.. I have attached my UIAlertview
I am creating a project in which I have three UITextField s and one
I have one strange problem.I have two UItextfields in my view and a button.When
I want to dismiss UIAlertView anywhere outside it with one tap. I want to
Essentially I have a UIAlertView that pops up. When a user selects a button
Facing some weird moment of my career. I have some uitextfield's and one uitextview
I have an UIAlertView with 2 buttons. But I am not to able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.