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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:05:31+00:00 2026-06-06T11:05:31+00:00

In my app i git dat from DB by php file in internet and

  • 0

In my app i git dat from DB by php file in internet and data shown in a Table view but i need to reload my data every minute, i can get the new data every minute but i cant replace it in the table view.

1) Do you know how to do it?

2) If you know how to get my code more simple, and delete that unNeeded codes? I’ll be thanks to you.

My ViewController.m

#import "ViewController.h"
#import "CJSONDeserializer.h"

@implementation ViewController
@synthesize tblMain, rows;

NSURL *url;
NSString *jsonreturn;
NSData *jsonData;
NSError *error;
NSDictionary *dict;
UITableViewCell *cell;
static NSString *CellIdentifier;

- (void)viewDidLoad{
    [super viewDidLoad];

    [self GetData];
}

-(void)GetData{
    url = [NSURL URLWithString:@"http://ar2.co/savola/"];
    jsonreturn = [[NSString alloc] initWithContentsOfURL:url];
    NSLog(jsonreturn);
    jsonData = [jsonreturn dataUsingEncoding:NSUTF32BigEndianStringEncoding];
    dict = [[[CJSONDeserializer deserializer] deserializeAsDictionary:jsonData error:&error] retain];
    rows = [dict objectForKey:@"savola"];
    NSLog(@"Array: %@",rows);
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [rows count];
}

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

    cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
    }

    dict = [rows objectAtIndex: indexPath.row];

    cell.textLabel.text = [NSString stringWithFormat:@"%@ - %@", [dict objectForKey:@"company"], [dict objectForKey:@"price"]];
    cell.detailTextLabel.text = [dict objectForKey:@"time"];

    return cell;
}


@end
  • 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-06T11:05:32+00:00Added an answer on June 6, 2026 at 11:05 am

    To force a table to reload its information, call [self.tableView reloadData] from your view controller class. That will call all of the data source methods again, and it will update the display as well.

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

Sidebar

Related Questions

My RoR app needs to checkout the file from local git server and display
Have an app that uses git for version control. A file called mkmf.log keeps
So currently I have included the following in my .bashrc file. export RUBYLIB=/home/git/project/app/helpers I
Is there a git gui app (for commiting) that shows detected renames? Git-gui currently
I have deployed my app in remote server with capistrano and git. I'm novice
I have the following directory structure: project/ .git/ ... app/ ... config/ initializers/ braintree.rb
I am trying to do 'deploy:cold' for my app. The git repo is local
My app is expanding, but the reqs dictate that there should be only one
Our app uses a component that requires a license file in the directory with
I have a number of branches in a git repository: david@Panama ~/app: git branch

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.