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

  • Home
  • SEARCH
  • 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 6833011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:55:41+00:00 2026-05-26T22:55:41+00:00

I have an alert view with a uitextfield added as a subview. In my

  • 0

I have an alert view with a uitextfield added as a subview.

In my uitableview controller the keyboard shows fine.

http://i301.photobucket.com/albums/nn76/hackmodford/c804bd91.jpg

However in a different view I wanted to do the same thing. So instead of using a UITableView Controller I made it a UIViewController so that I could add a toolbar at the bottom of the view.

But when I display the UIAlertView the keyboard is hidden. I’m thinking it’s behind the view because the alert view moves up to make room for the keyboard.

http://i301.photobucket.com/albums/nn76/hackmodford/5680aaa2.jpg

Any ideas?

UPDATE:

The reason the keyboard was being hidden was because I was dismissing a modalviewcontroller after showing the alert. For some reason it would dismiss the keyboard also I guess. Just rearranged the order an fit works fine now…

  • 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-05-26T22:55:41+00:00Added an answer on May 26, 2026 at 10:55 pm

    Try implementing the didPresentAlertView: method and inside set the text field to firstResponder like so:

    - (IBAction)someActionThatTriggersAnAlertView:(id)sender {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"TITLE" message:@"MESSAGE" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Done", nil];
        alert.alertViewStyle = UIAlertViewStylePlainTextInput;
        UITextField *someTextField = [alert textFieldAtIndex:0];
        someTextField.keyboardType = UIKeyboardTypeAlphabet;
        someTextField.keyboardAppearance = UIKeyboardAppearanceAlert;
        someTextField.autocorrectionType = UITextAutocorrectionTypeNo;
        [alert show];
        [alert release];
    }
    
    #pragma mark - UIAlertViewDelegate Methods
    
    - (void)didPresentAlertView:(UIAlertView *)alertView {
        [[alertView textFieldAtIndex:0] becomeFirstResponder];
    }
    

    UIAlertView Documentation
    UIAlertViewDelegate Documentation

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

Sidebar

Related Questions

Possible Duplicate: Create an alert on any view controller after Facebook request:didFailWithError: I have
I have create UITextField with alert view. After typing on UITextField I want to
I have troubles when I perform a UIAlertView, (the alert view works fine) but...
Lets say I have multiple View controller classes using the same UIAlertView *alertView. *alertView's
I have two UIAlertView s in same view controller and I want to use
I have created an alert view with two buttons using the following code: UIAlertView
I have some regular alert views and a custom alert view called 'UINotificationAlertView' I
I have a simple list view with some check boxes in an alert dialog.
I have this alert view (disclaimer) that pop up when app finish launching. It
I have a UINavigationController with a root view controller and then I push a

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.