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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:57:08+00:00 2026-06-17T09:57:08+00:00

Very familiar with Android programming, however very new to iOS (and Objective – C).

  • 0

Very familiar with Android programming, however very new to iOS (and Objective – C).

I am calling a remote php file within my application and (I believe) successfully parsing the JSON results according to my NSLOG results. Example:

2013-01-17 14:24:30.611 JSON TESTING 4[1309:1b03] Deserialized JSON Dictionary = {
products =     (
            {
        BF = "";
        EN = "2342";
        Measure = ft;
        Name = "Brian";
        "Name_id" = 1;
        Home = "New York";
        "DB_id" = 1;
    },
            {
        BF = "";
        EN = "2123";
        Measure = ft;
        Name = "Rex";
        "Name_id" = 3;
        Home = "New York";
        "DB_id" = 5;
    }
);
success = 1;

}

My question lies in how to populate this information into a table view. I can customize a prototype cell, but where do I go from there?

EDIT:

Here is my code for the view setup:

#pragma mark - Table View

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return productArray.count;
    NSLog(@"Number of arrays %u", productArray.count);
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) 
    {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
    }


    NSDictionary *productDictionary = [productArray objectAtIndex:indexPath.row];
    cell.textLabel.text = [productDictionary objectForKey:@"BF"];

    return cell;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self launchTest];
}

and my .h file

@interface tpbaMasterViewController : UITableViewController 
{
    NSDictionary *lists;
    NSArray *productArray;
}

- (void) launchTest;

@property (strong, nonatomic) IBOutlet UITableView *tableView;



@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-17T09:57:10+00:00Added an answer on June 17, 2026 at 9:57 am

    You access the objects in a NSDictionary using objectForKey methods. For example, to get an NSArray of the products in the dictionary:

    NSArray *productArray = [myDictionary objectForKey:@"products"];
    

    Now you have an array with two dictionary objects. For the various UITableViewDataSource methods you can query the array. A couple of examples:

    For – tableView:numberOfRowsInSection:, return the number of objects in the array:

    `return productArray.count;`
    

    And for tableView:cellForRowAtIndexPath::

    NSDictionary *productDictionary = [productArray objectAtIndex:indexPath.row];
        myCell.bfLabel.text = [productDictionary objectForKey:@"BF"];
        myCell.enLabel.text = [productDictionary objectForKey:@"EN"];
       //  continue doing the same for the other product information
    

    Declaring productArray in the .m file as shown below makes it visible within your view controller (assumes productDictionary is a property:

    @interface MyCollectionViewController () {
        NSArray *productArray;
    }
    @end
    ...
    @implementation MyCollectionViewController
    
        -(void)viewDidLoad{
            [super viewDidLoad];
    
            productArray = [self.myDictionary objectForKey:@"products"];
        }
    ...
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am very much new to cocos2d.. I am developing an application in android
We are very familiar with the built-in Maps application on Android and I wanted
I am very familiar with STL vector (and other container) performance guarantees, however I
I've been programming in c++ for a bit now and Im very familiar with
I'm new to IDEA, but very familiar with Eclipse. I followed the instructions here
I am a novice at Wordpress but I am very familiar with PHP and
I'm writing an android apps in Java of Eclipse. I'm not very familiar with
I'm not very familiar with PHP so I'm really struggling with this. I have
I'm very new to server side programming, and I want to develop something by
i'm not very familiar with the memory management in Objective-C but i try my

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.