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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:04:46+00:00 2026-06-02T00:04:46+00:00

I’m trying to reload my app with new data from a JSON feed. i’d

  • 0

I’m trying to reload my app with new data from a JSON feed. i’d try;

- (void) Refresh {
[self performSelector:(@selector(refreshDisplay:)) withObject:(_tableView) afterDelay:0.5];
}

and

- (void)refreshDisplay:(UITableView *)tableView {

    [_tableView reloadData]; 
}

Downloading the JSON:

     NSString *jsonString = [NSString 
                                stringWithContentsOfURL:[NSURL URLWithString:xmlDataUrl] 
                                encoding:NSUTF8StringEncoding
                                error:nil];

        SBJSON *parser = [[SBJSON alloc] init];
        NSDictionary *results = [parser objectWithString:jsonString error:nil];

        parser = nil;

        [self setTableData:nil];
        [self setTableData:[results objectForKey:@"feed"]];

But it’s not reloading my new data from the JSON, does anyone know how i can update the tableview with new data i’m downloading from a online JSON feed? I need to delete the old data from the JSON feed and insert the new data.

  • 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-02T00:04:48+00:00Added an answer on June 2, 2026 at 12:04 am

    Are you sure your data is actually changing? You could place some NSLogs in your -tableView:cellForRowAtIndexPath: method to make sure it’s getting called. It seems like your issue is that you’re simply telling it to refresh after half a second, and the data may not be loaded by then. I suggest you put the [tableView reloadData] call in the method which actually finishes updating the data, so that you know it’s done by the time you call it.

    Note too that this method:

    - (void)refreshDisplay:(UITableView *)tableView {
        [_tableView reloadData]; 
    }
    

    isn’t needed. First of all, it ignores the argument and calls reloadData on your ivar _tableView. Secondly, if all you wanted to do was reload the data after half a second, you can call:

    [_tableView performSelector:@selector(reloadData) withObject:nil afterDelay:.5];
    

    Further, based on the fact that it’s called _tableView if you have an @synthesize tableView=_tableView you’re better off using self.tableView anywhere you can, as this avoids accessing the ivar directly and is considered “good form”.

    To reiterate, make sure your data source is actually updating the data before calling reloadData on the tableview.

    Edit

    To your updated post, simply add [self.tableView reloadData]; at the end of your JSON parsing code.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

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.