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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:29:50+00:00 2026-06-08T05:29:50+00:00

This is the text field delegate method but i have doubt about return type

  • 0

This is the text field delegate method but i have doubt about return type

-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
  [textField resignFirstResponder];

   return NO;
}  

and this is the same method with different return type

-(BOOL)textFieldShouldReturn:(UITextField *)textField
 {
   [textField resignFirstResponder];

   return YES;
 }

by both we can hide key board in i phone . but what is the meaning of return type “YES” or “NO”. I am not seeing any difference.

  • 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-08T05:29:52+00:00Added an answer on June 8, 2026 at 5:29 am

    The textFieldShouldReturn is a place where you can handle the Return button on the keyboard.

    textFieldShouldReturn asks the delegate if the text field should process the pressing of the return button.

    If you implement your own code to process the return button you should return NO, or return YES for it to be handled in the default way.

    The IOS Docs state:
    The text field calls this method whenever the user taps the return button. You can use this method to implement any custom behavior when the button is tapped.

    http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITextFieldDelegate_Protocol/UITextFieldDelegate/UITextFieldDelegate.html

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

Sidebar

Related Questions

When I delete characters from a UITextField field one-by-one, the delegate method textField:shouldChangeCharactersInRange:replacementString: is
I have added an extra field Specification in Catalog->Product->Data tab. This text is stored
i want to make autocomplete for many text input field... but with this autocomplete
I have the following text contained within a field in my DB: [quote:5a7b87febe=mr smith]This
I have in a view this method - (void)viewWillAppear:(BOOL)animated{ [textField1 becomeFirstResponder];} then when I
I am using NSNotification for my textView but this delegate method is also called
I am use a button and when u click this button a text field
I want to get the text field test out of this web page. How
I am using the tagsinput text field on my website from this project .
I am not able to apply onclick event in global custom text field. This

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.