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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:44:15+00:00 2026-06-01T20:44:15+00:00

In my application i display item’s. My JSON feed contains 50 items but first

  • 0

In my application i display item’s. My JSON feed contains 50 items but first i want to display 25 and when a user scrolls down to the last row it need to load more items.

i’m doing:

Downloading the JSON feed;

NSString *jsonString = [NSString 
                        stringWithContentsOfURL:[NSURL URLWithString:xmlDataUrl] 
                        encoding:NSStringEncodingConversionAllowLossy
                        error:nil];
SBJSON *parser = [[SBJSON alloc] init];
NSDictionary *results = [parser objectWithString:jsonString error:nil];
parser = nil;
[self setTableData:[results objectForKey:@"feed"]];

//

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    // Return the number of sections.
    return 1;
}

//

 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
        // Return the number of rows in the section.
        //return [tableData count];
        return 25;
    }

And detect last row:

   if(indexPath.row == [self.tableData count] - 1) 
    {

        NSLog(@"Last Row");
    }

But it’s not detecting the last row. Is this because the JSON it’s downloading contains more than 25 rows?

And how i can add a new row is something like [self.tableDate count] +1; possible?

If i do return [tableData count]; it’s detecting the last row but the rows are already filled for 100% i need to display 25/50 and than +1

  • 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-01T20:44:17+00:00Added an answer on June 1, 2026 at 8:44 pm

    Where are you calling that second block of code? Is it in your table delegate’s willDisplayCell: method?

    In one of my projects, I have very similar code

    - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
    {
        if (indexPath.row == self.search.count && [tableView.indexPathsForVisibleRows containsObject:indexPath])
        {
            [self.search findMoreStuff];
        }
    }
    

    With an extra row appended after the ones created for self.search, so in my case I’m checking for self.search.count, but you probably want to look at self.search.count-1

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

Sidebar

Related Questions

I have a WPF application with ListBox that display list of items. Each item
In android project/application,I want to display screen2 containing listview when the list item of
In a Django application, I want to display a multi-level (but fixed-depth) tree of
I have simple application, that shows list of many items, where user can display
An application recieves the WM_SYSCOMMAND message when the user selects a menu item command
I created two Spinners to display the data in my application. In my first
I am making an android application that needs to display all of the items
I am building an application which uses Flashdata to display messages to the user
In my application is required the user to select an item from a list
I have an application in JavaME that can display the feed from viewfinder using

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.