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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:06:44+00:00 2026-06-10T14:06:44+00:00

I am new to iPhone Development. My app is sending URL request to retrieve

  • 0

I am new to iPhone Development. My app is sending URL request to retrieve data from server by using NSURLConnection. I’m getting data in JSON format and I’m storing it in NSMutableArray as array of dictionaries. So I have an array of dictionaries. I need to display specific data in UITableViewCell.

My code is Here…

-(IBAction)ButtonTapped:(id)sender
{
     NSString *strURL=[NSString stringWithFormat:@"URl Name here"];
     NSURL *url=[NSURL URLWithString:strURL];
     self.request=[NSURLRequest requestWithURL:url]
     self.nsCon=[[NSURLConnection alloc] initWithRequest:request delegate:self];

     if(self.nsCon)
     {
        self.receivedData=[[NSMutableData alloc] init];
     }
     else
     {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",@"") message:NSLocalizedString(@"Not Connected Other View !!",@"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK",@"") otherButtonTitles:nil];
        [alert show];
        [alert release];
     }
}

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
    // receivedData is an instance variable declared elsewhere.
    [receivedData setLength:0];
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
    // Append the new data to receivedData.
    // receivedData is an instance variable declared elsewhere.
    [receivedData appendData:data];
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
    // inform the user

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",@"") message:NSLocalizedString(@"Connection failed !!",@"") delegate:nil cancelButtonTitle:NSLocalizedString(@"OK",@"") otherButtonTitles:nil];
    [alert show];
    [alert release];

}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
    NSString *responseString = [[NSString alloc] initWithData:self.receivedData encoding:NSUTF8StringEncoding];     
    self.theDictionary= [[NSMutableDictionary alloc] init];
    self.theDictionary = [responseString JSONValue];

    self.arrofDictionary=[[NSMutableArray alloc] init];
     [self.arrofDictionary addObject:self.theDictionary];

    NSLog(@"data length - %@ ",[self.theDictionary objectForKey:@"today"]);

    // release the connection, and the data object
    [connection release];
    [receivedData release];

    self.tblList=[[UITableView alloc] initWithFrame:CGRectMake(0,80,320,370) style:UITableViewStyleGrouped];
    self.tblList.delegate=self;
    self.tblList.dataSource=self;
    [self.view addSubview:self.tblList];

}

// data display in consol

(
        {
        "date_time" = "2012-08-31 09:30:25";
        id = 99;
        language = en;
        name = Tt;
        score = 656;
    },
        {
        "date_time" = "2012-08-31 10:08:52";
        id = 103;
        language = en;
        name = Fg;
        score = 567;
    },
        {
        "date_time" = "2012-08-31 08:22:38";
        id = 87;
        language = en;
        name = Eree;
        score = 565;
    },
)

Then how can I display name and score on UITableViewCell ??

  • 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-10T14:06:46+00:00Added an answer on June 10, 2026 at 2:06 pm

    You displayed data is in array of dictionary objects(yourArray). You use following code.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *CellIdentifier = @"Cell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
        if (cell == nil) {
    
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
    
        }
         cell.textLabel.text = [[yourArray objectAtIndex:indexPath.row]  objectForKey:@"name"];
        cell.detailTextLabel.text = [[yourArray objectAtIndex:indexPath.row]  objectForKey:@"score"];
    
    
    
        return cell;
    }
    

    I think it will be helpful to you.

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

Sidebar

Related Questions

I'm new to iPhone development. I'm building an app that loads data from a
I am new on iPhone development. I am making an app, using sqlite3 for
Looking at adding some data graphing to a new iPhone app in development (ala
I am new iphone development. In my app, i am using two textfield and
I am new to iphone development. In my app, i am using number of
I am new to iphone app development, while taking picture from camera I am
I am new to iphone development. I am trying to store some data using
I am new to iPhone development. I am building an app by using Xcode
I am new to iPhone app development and have a question about storing data.
I new to iPhone development. I am working on an iPhone app using the

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.