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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:41:05+00:00 2026-06-08T10:41:05+00:00

Am I the only one who get this problem? I have few sections and

  • 0

Am I the only one who get this problem?

I have few sections and few rows in grouped table view, for registration page. When I slide up and down the page, there’s strange separator bold line appear between two cells. Some of the cell sinks like it has been pressed. Is this a iOS 5.0 bug? I have worked for 3 days for this little problem. Please help!

I have try

self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;

and

self.tableView.separatorColor = [UIColor lightGrayColor];

None of them work.

[Edited]

Paul Peelen you’re right and I know what you meant, but I don’t have the knowledge to continue forward. Before I comment the “if(cell == nil)”, everything is the same as what you’ve said. But after I comment it, the label is displayed well and no problem with the separator line anymore, but when I insert the texts into the textField and slide down, and up again, the textField’s text is gone and been refreshed. How do I solve this one?
Below is my code:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 
static NSString *CellIdentifier = @"LabelCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

//Here's the problem!
if(cell == nil)
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

cell.selectionStyle = UITableViewCellSelectionStyleNone;

UILabel *keyLbl = [[UILabel alloc] initWithFrame:CGRectMake(15, 8, 100, 30)];
keyLbl.font = [UIFont fontWithName:@"Futura-CondensedExtraBold" size:15.0];
keyLbl.textColor = [UIColor colorWithRed:0.275 green:0.275 blue:0.275 alpha:0.9];
keyLbl.backgroundColor = [UIColor clearColor];


valTxtField = [[UITextField alloc] initWithFrame:CGRectMake(120, 5, 180, 30)];
valTxtField.font = [UIFont fontWithName:@"Futura-CondensedExtraBold" size:18.0];
valTxtField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
valTxtField.delegate = self;
valTxtField.returnKeyType = UIReturnKeyDone;
valTxtField.autocorrectionType = UITextAutocorrectionTypeNo;
valTxtField.autocapitalizationType = UITextAutocapitalizationTypeNone;

if(indexPath.section == 0)
{
    if(indexPath.row == 0)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_EMAIL", nil);
        email_TextField = valTxtField;
    }
    else if(indexPath.row == 1)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_RE_EMAIL", nil);
        reEmail_TextField = valTxtField;  
    }
    else if(indexPath.row == 2)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_PWD", nil);
        password_TextField = valTxtField;
        valTxtField.secureTextEntry = YES;
    } 
    else if(indexPath.row == 3)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_RE_PWD", nil);
        rePassword_TextField = valTxtField;
        valTxtField.secureTextEntry = YES;
    }

}
else if(indexPath.section == 1)
{
    if(indexPath.row == 0)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_FIRSTNAME", nil);
        firstName_TextField = valTxtField;
    }
    if(indexPath.row == 1)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_LASTNAME", nil);
        lastName_TextField = valTxtField;
    }
    if(indexPath.row == 2)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_POSTCODE", nil);
        postCode_TextField = valTxtField;
    }
    if(indexPath.row == 3)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_GENDER", nil);
        gender_TextField = valTxtField;
    }
    if(indexPath.row == 4)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_DOB", nil);
        DOB_TextField = valTxtField;
    }
    if(indexPath.row == 5)
    {
        keyLbl.text = NSLocalizedString(@"REGIS_MOBILE", nil);
        mobile_TextField = valTxtField;
    }
}
[cell addSubview:keyLbl];
[cell addSubview:valTxtField];
[keyLbl release];
[valTxtField release];

return cell;

}

  • 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-08T10:41:07+00:00Added an answer on June 8, 2026 at 10:41 am

    OK, this is mainly because the cell identifier. Since the table view recycle its contents to display every time I scroll up and down, and if I use the same cell identifier, strange behaviour like I mentioned above will happen.

    This is my solution to all the strange things happen on displaying the table view:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    //Here the solution:
    NSString *CellIdentifier = [NSString stringWithFormat:@"RCell%1dR%1d",indexPath.section,indexPath.row];
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
    if (cell == nil) 
    {
       //your tableView code...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Only one instance of a ScriptManager can be added to the page. this error
I need to have only one button in showConfirmDialog . I tried this: int
Only one instance of a Script Manager can be added to the page. Such
Why only one overload throws this exception? Little update: I understand that there was
I have one user (only one, all the others are fine) trying to update
I want to select only one radio button but I cant do this. Here
I found only one attempt to create such compiler - http://sourceforge.net/projects/xsltc/ . But this
I have only one class with many instances. Every instance is observer of couple
I had only one function to Add another row to the table id=tblOtherParties and
I have this kind of table for simple chat: messages table structure +----+---------+-----------+---------+------+------+ |

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.