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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:20:50+00:00 2026-06-09T13:20:50+00:00

I have a Dynamic table view which has 5 prototype cells, inside each cell

  • 0

I have a Dynamic table view which has 5 prototype cells, inside each cell I have 6 textfields. I´m tagging the textfields but I´m having trouble understanding How can I get the values from all of them in the “textFieldDidEndEditing“.
In my code I have this:

-(void) textFieldDidEndEditing:(UITextField *)textField
{
NSMutableArray *cellOneContentSave = [[NSMutableArray alloc] init];
NSString *cellOneTexfieldOneTxt;
if (textField == [self.view viewWithTag:1503])
{
cellOneTexfield1Txt = textField.text;
[cellOneContentSave addObject:cellOneTexfieldOneTxt];  
}

Problem 1: BUT! this only get´s me the value from one texfield in cell one…Should I be using a switch for each cell and texfield?.

Problem 2: I said it was a dynamic tableview, so the user can insert news rows(per section) pressing the green + button that appears on the left side when he enters the commit edit style…and when he enters, should the tag´s of the newtexfields have different tag´s?. In one hand I think not, because it´s new texfields BUT different indepaxth.row….but in the other hand I don´t know if the controller demands new tag´s…

  • 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-09T13:20:51+00:00Added an answer on June 9, 2026 at 1:20 pm
    -(void) textFieldDidEndEditing:(UITextField *)textField
    {
        // assuming your text field is embedded directly into the table view
        // cell and not into any other subview of the table cell
        UITableViewCell * parentView = (UITableViewCell *)[textField superview];
    
        if(parentView)
        {
            NSMutableArray *cellOneContentSave = [[NSMutableArray alloc] init];
            NSString *cellOneTexfieldOneTxt;
    
            NSArray * allSubviews = [parentView subviews];
            for(UIView * oneSubview in allSubviews)
            {
                // get only the text fields
                if([oneSubview isKindOfClass: [UITextField class]])
                {
                    UITextField * oneTextField = (UITextField *) oneSubview;
    
                    if(oneTextField.text)
                    {
                        [cellOneContentSave addObject: oneTextField.text];
                    } else {
                        // if nothing is in the text field, should
                        // we simply add the empty string to the array?
                        [cellOneContentSave addObject: @""];
                    }
                }
            }
        }
    
        // don't forget to actually *DO* something with your mutable array
        // (and release it, in case you're not using ARC), before this method
        // returns.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dynamic tableview which has a prototype cell with a button that,
Using storyboard, I have a table view controller containing multiple dynamic prototype cells. One
I have a custom table cell which has a custom ui view in it.
I have two table cells, with dynamic content. Table cell one works fine, when
I have a UITableView and a UITableCell subclass. Each table cell has two scrollviews
I am making a custom table view which has content 'Static Cells' and style
I have a simple data table which contains dynamic form text fields. Each field
I have a dynamic table view with cells populating from a db. When a
What im doing is I have a dynamic table and creating rows which all
I have a DDL and Button which when clicked create a dynamic table; all

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.