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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:49:23+00:00 2026-05-26T01:49:23+00:00

I have mulitple UITextFields in a view. I’m assuming the place to capture the

  • 0

I have mulitple UITextFields in a view.

I’m assuming the place to capture the vlue of a UITextField once the user comes out of it is to implement the delegate method “textFieldShouldReturn”.

Question – In “textFieldShouldReturn” however, how do I tell which of the UITextField’s triggered this?

For example assuming at this stage I now need to update my data model with the value of what the UITextField now shows, so need to update the correct field in the model with aligns with that particular UITextField.

PS If there’s a better approach, or a way to kind of “binding” approach I’m missing I’d be interested

  • 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-26T01:49:23+00:00Added an answer on May 26, 2026 at 1:49 am

    …or you can skip all the tags and make your UITextViews instance vars and do:

    - (void)viewDidLoad {
        myTextView1 = [[UITextView alloc] init];
        myTextView2 = [[UITextView alloc] init];
        myTextView3 = [[UITextView alloc] init];
        myTextView4 = [[UITextView alloc] init];
        ......
    }
    
    - (void)textFieldShouldReturn:(UITextField *)textField {
        BOOL shouldReturn = NO;
    
        if (textField == myTextView1)
        {
            shouldReturn = YES;
        }
    
        ...and so on...
    
        }
    
    ... release the instance vars in the dealloc...
    

    I kinda prefer this way, but the other answer will work too.

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

Sidebar

Related Questions

I'm using a UITextfield to input information. I have several UITextfields that need to
I have an app with mulitple views. On view one I create and NSDate
I have an requirement to implement a custom keyboard for a Cocoa Touch data
I have multiple textfields in a view (not a scrollview); 2 in particular are
I have a multiple view based application, the problem is that when I push
I have tried django-filer to select mulitple files in a single filefield just i
I am running Hive 071 I have a table, with mulitple rows, with the
I have a repeater showing the rows of data.I have used javascript for user
Possible Duplicate: How to create a multiline UITextfield? How can I implement a multiple
I have a custom (subclass of) UITableViewCell with multiple UITextFields in it. I would

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.