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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:26:08+00:00 2026-05-29T04:26:08+00:00

I have a viewController with this: @interface RootViewController : UIViewController <UITextFieldDelegate>{ Then I have

  • 0

I have a viewController with this:

@interface RootViewController : UIViewController <UITextFieldDelegate>{

Then I have a textfield added programmatically like this in viewController.m:

UITextField*textFieldRounded=[[UITextField alloc] initWithFrame:frame];
textFieldRounded.delegate = self;

In the same .m i have tried all of these:

- (void)textFieldDidEndEditing:(UITextField *)textField{
    [textField resignFirstResponder];
NSLog(@"returned?");
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    [textField resignFirstResponder]; 
NSLog(@"returned?");
 return YES;
}

-(BOOL)textFieldShouldEndEditing:(UITextField *)textField{
    [textField resignFirstResponder];
NSLog(@"returned?");
    return YES;

}

The keyboard appears fine when I click the text field, which is in a subview of the viewController. but pressing Done does nothing. The NSLog statements never appear, so these methods are never getting called. Any ideas?

  • 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-29T04:26:09+00:00Added an answer on May 29, 2026 at 4:26 am

    I just barely had this question, maybe, but what I did was attached a tap gesture recognizer object to the view, made a instance method called clear keyboard:, and inside the function I put [whateverItIsThatOpenedTheKeyboard resignFirstResponder]; and that’s it. Maybe you asking something totally different, but I thought I would try and help 🙂

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

Sidebar

Related Questions

I have a simple ViewController that looks like this: @interface MyViewController : UIViewController<UIScrollViewDelegate> {
I have a viewController called HaveScrollController, and this is something like this: @interface HaveScrollController
I have the following ViewController class #import <UIKit/UIKit.h> @interface SampleViewController : UIViewController { IBOutlet
So I have this iPhone app with a nested setup like this: [RootViewController]->[UITabBarController]->[UINavigationController]->[subViewControllers]. Everything
In my viewController.m I have this code: self.movie = [[myMovie alloc]init]; self.movie.name = @Iron
I have a viewcontroller like the following. But the touchsBegan doestnt get detected. Can
I have a ViewController that has its own NIB. I would like to embed
I have a ViewController in Interface Builder that has a TableViewController embedded in it
I have a ViewController and UIWebView created in Interface Builder in it. I fill
I have a ViewController defined as follows: @interface SectionController : UITableViewController { NSMutableArray *sections;

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.