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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:38:02+00:00 2026-06-18T11:38:02+00:00

i am using AFNetworking to parse youtube JSON data on a UITableView. For some

  • 0

i am using AFNetworking to parse youtube JSON data on a UITableView.

For some reason i am getting a empty UITable. I am not sure what i am doing wrong.

Please have a look at my code:

Here is the project on Google Drive

#import "KKViewController.h"

#import "AFNetworking.h"

#import "AFJSONRequestOperation.h"

@interface KKViewController ()

@end

@implementation KKViewController



- (id)initWithStyle:(UITableViewStyle)style
{
    self = [super initWithStyle:style];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    NSString *urlAsString = @"http://gdata.youtube.com/feeds/api/playlists/PL0l3xlkh7UnvLdr0Zz3XZZuP2tENy_qaP?v=2&alt=jsonc&max-results=50";

    NSURL *url = [NSURL URLWithString:urlAsString];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];


   AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {



       self.videoMetaData = [JSON valueForKeyPath:@"data.items.video"];

      // NSLog(@" video Meta Data %@", self.videoMetaData);





    } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
        NSLog(@"Request Failed with Error: %@, %@", error, error.userInfo);
    }];

    [operation start];


}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{



  return [self.videoMetaData count];

}



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

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];

    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellID];
    }


    NSDictionary *titles = [self.videoMetaData objectAtIndex:indexPath.row];

    NSLog(@"%@",titles);

    cell.textLabel.text = [titles objectForKey:@"title"];

    return cell;
}
  • 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-18T11:38:03+00:00Added an answer on June 18, 2026 at 11:38 am

    Have you tried to reload the table view after the data loads?

    AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
        NSLog(@"JSON = %@", JSON);
        self.videoMetaData = [JSON valueForKeyPath:@"data.items.video"];
        NSLog(@" video Meta Data %@", self.videoMetaData);
        [self.tableView reloadData]; // Now I need to reload the table view data.
    } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
        NSLog(@"Request Failed with Error: %@, %@", error, error.userInfo);
    }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using AFNetworking to parse JSON data on UITableView. YouTube api give JSON
I am using afnetworking to parse JSON data. I want to print the data
I using AFNetworking to populate a UITableView with youtube videos. YouTube API only allows
I'm using AFNetworking and like it very much. I need to get JSON data
I'm using AFNetworking for asynchronous calls to a web service. Some of these calls
I'm using the AFNetworking library to pull a JSON feed from a server to
i 'm downloading some files using AFNetworking using a queue. Here is my code:
I am doing an authentication by using AFNetworking like below AFJSONRequestOperation *operation = [AFJSONRequestOperation
I am using AFNetworking for parsing JSON output and am at a point where
I just started using AFNetworking and so far it worked fine for just getting

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.