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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:38:13+00:00 2026-05-27T02:38:13+00:00

I am building a custom cell in the storyboard with the identifier TextCell. It

  • 0

I am building a custom cell in the storyboard with the identifier “TextCell”. It is a plane cell, however by code i am adding to each cell a textfield because i can have an “n” number of cells so the user can insert text in each. My issue is that the textfields that i create seem to be creating themselves over and over again in top of the other. I can say this because i have a placeholder text and it gets darker and darker.

I am using ARC as well. Please any insight that you can provide me can help me a lot.

I am attaching the code of the function where i am adding the textfields to the cells:

UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"TextCell"];


//create text field inside cell and init it with the default settings
UITextField * textHolder = [[UITextField alloc] initWithFrame:CGRectMake(18, 10, 300, 44)];
[textHolder setPlaceholder:[cellsText objectAtIndex:indexPath.row]];
//[textHolder setValue:[UIColor blackColor] forKeyPath:@"_placeholderLabel.textColor"];
[textHolder setFont:[UIFont fontWithName:@"HelveticaNeue-Regular" size:16]];
[textHolder setTextColor:[UIColor blackColor]];
[textHolder setTextAlignment:UITextAlignmentLeft];
textHolder.tag = FIELD_PREFIX + indexPath.row;
[textHolder setDelegate:self];

[[NSBundle mainBundle] loadNibNamed:@"accessoryView" owner:self options:nil];
[textHolder setInputAccessoryView:accessoryView];
[cell addSubview:textHolder];    

//set keyboard to type passwords    
[textHolder setSecureTextEntry:YES];    
  • 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-27T02:38:14+00:00Added an answer on May 27, 2026 at 2:38 am

    Each time the cell gets reused you add another UITextField to the preexisting set of text fields. You have two options:

    1) Put the text field in the custon table view cell in your storyboard instead of creating it manually. By using a custom subclass of UITableViewCell you can as well assign your text field to a property in your custom subclass. This has the added bonus that you may add a bunch of other things to the cell. You can then access the property instead of creating a new text field.

    2) Remove the “old” text field before creating a new one. You’d probably have to search all subviews for instances of UITextField to achieve this as you are already using the tag value for something else.

    The first one is definitely the cleaner version.

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

Sidebar

Related Questions

Here I have pasted link for code: http://blog.asolutions.com/2010/09/building-custom-map-annotation-callouts-part-1/ In this code I have just
I'm building a custom Ubuntu kernel and have modified one of the source files.
I'm building a custom UITableView with each of the cells containing a piece of
After looking through the code for building custom credential providers for Windows 7, I
Iam building a custom rating bar. With help of kozyr's article i have created
I'm building a custom WordPress theme and have a quick question regarding WordPress and
I am building a Custom Image Picker, that shows 6 alternative versions. However the
I'm building my custom cell for a table view. I'm trying to load an
When building a custom frame/view in iOS code, how do you set its rotation
Where can i find good resources for building custom ui for titanium apps like

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.