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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:04:04+00:00 2026-05-16T23:04:04+00:00

been having this problem for a few days now and can’t seem to find

  • 0

been having this problem for a few days now and can’t seem to find a solution for it. It’s probably some very basic stuff but still can’t come up with a solution.

I have a bunch of labels nested inside table view cells with an edit navigation controller button that goes to another table view.
This table view has text fields that store data into an SQLite database. The labels return certain values from the database. Now this part works perfectly.
But when I update a text field and navigate back to the labels the label is not updated,if I scroll the table so that the modified cell is out of the view then it gets updated, so think the problem is that the cell still has the old value cached and only releases it once its dequeued.

Part of the code:(at least i think this is what matters as this is where the cells are created)

Any help is welcome.
Thanks

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

static NSString *CellIdentifier = @"ContactsDetailCell";


UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell.

int row = [indexPath row];
int section = [indexPath section];

NSDictionary *resultSet = [sqliteManager queryRow:[NSString stringWithFormat:@”SELECT * FROM contacts WHERE id = %d;”, contactsId]];

switch (section) {
case 0:
switch (row) {
case 0:
cell.textLabel.text = @”Name:”;

UILabel *nameLabel = [[UILabel alloc] initWithFrame: CGRectMake(90, 10, 200, 25)];
  nameLabel.text = [resultSet objectForKey:@"name"];
  nameLabel.textColor = [UIColor blackColor];
  nameLabel.font = [UIFont systemFontOfSize:17.0];
  nameLabel.backgroundColor = [UIColor whiteColor];
  cell.selectionStyle = UITableViewCellSelectionStyleNone;
  [cell.contentView addSubview:nameLabel];
  [nameLabel release];
 break;
case 1:

 cell.textLabel.text = @"Address:";
 cell.selectionStyle = UITableViewCellSelectionStyleNone;

UILabel *addressLabel = [[UILabel alloc] initWithFrame: CGRectMake(90, 10, 200, 25)];

  addressLabel.text = [resultSet objectForKey:@"address"];
  addressLabel.textColor = [UIColor blackColor];
  addressLabel.font = [UIFont systemFontOfSize:17.0];
  addressLabel.backgroundColor = [UIColor whiteColor];
  [cell.contentView addSubview:addressLabel];
 [addressLabel release];
 break;

default:
 break;

}
break;
default:
break;

  • 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-16T23:04:04+00:00Added an answer on May 16, 2026 at 11:04 pm

    You have to tell the view to update the data and bind to the UITableView again after a change has been made. You can do this in the viewWillAppear method which is called when you navigate backwards.

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

Sidebar

Related Questions

I have been having this problem for a few days now, and really cant
I have been having this problem for the last few days and I can't
I have been having some problems with this for a few days now... I
I have been having this problem for some time now, I dont exactly know
I've been going at this problem for a solid couple hours now and having
I've been having this really annoying thing happen the past few days, that has
I've been doing web development for a few months now and keep having this
This one has been driving me nuts for a few days now and I've
After having written a few helper classes in magento, now i have this problem,
Morning, I have been working on this problem for a few days and cannot

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.