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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:11:02+00:00 2026-05-23T14:11:02+00:00

I have a UITableView some UITextField on Table view cell. UITextField s in user

  • 0

I have a UITableView some UITextField on Table view cell. UITextFields in user enter some values on the text field and then scrolling table view.the value on text field is not persist. below code

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {  
return 100; 
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier    = @"Cell";
static NSString *CellIdentifierFirst    = @"CellFirst";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifierFirst];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:CellIdentifier] autorelease];

}

NSArray *cellSubs = cell.contentView.subviews;
for (int i = 0 ; i < [cellSubs count] ; i++) {
    [[cellSubs objectAtIndex:i] removeFromSuperview];
}

cell.selectionStyle = UITableViewCellSelectionStyleNone;

UITextField * textFieldRounded = [[UITextField alloc] initWithFrame:CGRectMake(100, 5, 150, 40)];
textFieldRounded.borderStyle = UITextBorderStyleNone;
textFieldRounded.textColor = [UIColor blackColor]; 
textFieldRounded.font = [UIFont systemFontOfSize:17.0];  
textFieldRounded.placeholder = @"Type here"; 
textFieldRounded.backgroundColor = [UIColor whiteColor]; 
textFieldRounded.autocorrectionType = UITextAutocorrectionTypeNo;   
textFieldRounded.keyboardType = UIKeyboardTypeDefault;  
textFieldRounded.returnKeyType = UIReturnKeyDone;  
textFieldRounded.clearButtonMode = UITextFieldViewModeWhileEditing; 
textFieldRounded.delegate = self;   
[cell.contentView addSubview:textFieldRounded];
return cell;
}

So Please help me everyone

  • 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-23T14:11:02+00:00Added an answer on May 23, 2026 at 2:11 pm

    You will need to maintain a mutable array for all the rows. You will have to store the text in that array every time the text is changed and set the text from the array when cellForRowAtIndexPath: is called.

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

Sidebar

Related Questions

I have a strange problem with UITableView and UITextField inside the cell (as subview).
I have a grouped UITableView with some large images. However, scrolling performance is quite
I have a UITableView comprised of custom UITableViewCells with some text and a button
I have a UITableView with a few UITableViewCell s. Each cell contains a UITextfield
I have a UITableView that displays images, but I want some text to be
I have a UITableView with some cells containing UITextField objects and others with UIButton
I've set up a UITableView with several custom UITableViewCell's that have some UITextField's and
I have a UITableView with some cells. When a cell is tapped, I set
I have a UITableView with some cells, where (for example) the first cell is
I have the following problem: I have a UITableView with some Text and some

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.