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 3981614
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:25:52+00:00 2026-05-20T05:25:52+00:00

I have customized UIAlertView a bit. My implementation inherits from UIAlertView and adds a

  • 0

I have customized UIAlertView a bit. My implementation inherits from UIAlertView and adds a textfield to it. If the textfield is tapped, the iPad’s keyboard shows up.
Would I would like to achieve in additon however:

  • If the user presses “OKAY” in the alert view, the keyboard does not go away. How can I realize that?
  • The on the keyboard “RETURN” is pressed, I would like to dismiss the alert view (and of course hide the keyboard). Also here: how the heck..?

The code of my custom alert view can be seen here: http://www.wildsau.net/post/2011/01/28/iOS-UIAlertView-with-a-UITextField-a-MonoTouch-implementation.aspx

Note that it is MonoTouch but any solution working for ObjC, I will be able to translate.

  • 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-20T05:25:52+00:00Added an answer on May 20, 2026 at 5:25 am

    To dismiss the keyboard when the user taps the alert’s OK button, in the appropriate alert delegate method

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

    do this:

    [myTextField resignFirstResponder]
    

    To dismiss your alert view programmatically, use this:

    - (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated
    

    Then you use the same code in clickedButtonAtIndex: to resignFirstResponder to cancel the keyboard.

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

Sidebar

Related Questions

I have a 1920x1200 screen an would like to customize VS2008 code windows to
I have customized my own colors in eclipse but cannot find where to change
I have customized one of my forms and now it does not pass the
i have customized ListBox declared in XAML: <ListBox x:Name=uicMDSQonfServer> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation=Horizontal Margin=0,5,0,5>
i have a website that will have customized designs, depending on what store was
I have panel that I have customized. I use it to display text. But
I'm using the standard Apple moviePlayer sample code and have customized it to play
Right now I'm using Trac with multiple projects and have customized the project-listing template
In my magento project the search result not displays. I have customized my magento.
I have a mediawiki installation that I've customized with some of my own extensions.

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.