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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:32:53+00:00 2026-06-11T09:32:53+00:00

I have a UIVIew which is a subview and it contains several UITextFields. One

  • 0

I have a UIVIew which is a subview and it contains several UITextFields. One of these textfields (which is for DATE) should not be editable using the keyboard, instead of this I use a PopOver with a Datepicker inside.

I run a method when the UIControlEventEditingDidBegin is reached. This method calls the resignFirstResponder on the DateTextField.

Everything works fine if the DateTextField is the first field to edit, but when another textField is edited and of course shows the keyboard and then try to edit the DateField, the keyboard doesn’t hide and everything goes normal but with the Keyboard doing anything.

I have tried to call the method endEditing:YES before the resignFirstResponder but it doesn’t work. I have tried to run the endEditing:YES and resignFirstResponder on the didEndEditing text field method but theres no way to get that keyboard out.

here is my method:

- (void)showDatePopOver:(id)sender{ 
    [self.view endEditing:YES];

    UITextField *textField = (UITextField *)sender;
    [sender resignFirstResponder]; // hide keyboard

    /** POP OVER LINES**/
}
  • 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-11T09:32:54+00:00Added an answer on June 11, 2026 at 9:32 am

    You should use the textFieldShouldBeginEditing: delegate method instead of resigning first responder in didBeginEditing:

    This will allow editing on ALL BUT the dateTextField text field:

    - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
        return (![textField isEqual:dateTextField]);
    }
    

    You should specify that your view controller is a text view delegate as well like so (in the interface declaration [.h file]):

    @interface MyViewController : UIViewController <UITextFieldDelegate>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one UIView, which I'm using as my main view, and I want
I have uisearchbar in a uiview which is already subview of a uiviewController, I
I have a custom UIViewController, which is the only subView of UIView. The UIViewController
I have a UIView called activityView , which contains two subviews activityIndicator and cancelOperationsButton
I have a UIScrollView which contains a sub-UIView, insetView which is used to display
I have a zooming UIScrollView that contains a UIView which contains some custom UIViews
I have 3 pickers on my view, one of which contains only images. So,
I have a UIView that has a UIScrollView as a subview, which in turn
In my application I have one uiview. I am adding another subview to this
I have one view controller which contains two views (redView, blueView). The views are

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.