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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:26:58+00:00 2026-05-29T07:26:58+00:00

I have like 100 records to display on a table. But i will be

  • 0

I have like 100 records to display on a table. But i will be only displaying 10 records, and when the user clicks the last row (Which will have a button that will say load the next 10 records) the table will row the next 10 records.

I have displayed the more button on the last cell successfully. But i don’t know how to display 10 records at a time. My code so far;

ViewDidLoad

self.arrayThatContainsAllHundredRecords= [NSArray arrayWithArray:hundredRecordsArray];

[self performSelector:@selector(addTheTableFooter:) withObject:nil afterDelay:0.5]; 

addTheTableFooter

UIView* footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 30)];

[footer addSubview:moreButton]; // i have also added an event to the button click see below, and i have not shown it here.

self.tableView.tableFooterView =footer;

[self.mainWindow removeFromSuperview];

[self.tableView reloadData];

The above would Display the More button after displaying all 100 records.

moreButtonClickAction

-(void)moreButtonClickAction {
NSLog(@"Suppose to load the next 10 records");
}

numberOfRowsInSection

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

    return [self.arrayThatContainsAllHundredRecords count];
}

I need a way to edit this code, so i will only display 10 records at a time, and display the next 10 when the user clicks the more button. (Now the total records should be 20 – (previous 10 + the 10 records as a result of clicking the more button ))

NOTE: I will be downloading all 100 records and saving it in self.arrayThatContainsAllHundredRecords in the viewDidLoad method.

I believe that i have to make some change before executing [self.tableView reloadData];, as in tell to load 10 records.

Well, say if i only had 53 records. Then the user will click the more button 5 times and on the 6th instance, the table should display only 3 records. How can this be handled in the tableview:numberOfRowsInSection: ?

  • 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-05-29T07:26:59+00:00Added an answer on May 29, 2026 at 7:26 am

    tableView:numberOfRowsInSection: is the method that determines how many rows will be shown, so the first step will be to change that. You also need a property in your view controller to keep track of how many rows should be visible. Something like this:

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
        return self.numberOfRowsVisible;
    }
    

    And when the more button is clicked, you have to increase that number and reload the tableView data.

    -(void)moreButtonClickAction {
        if (self.numberOfRowsVisible < self.maxNumberOfRows) 
            self.numberOfRowsVisible = MIN(self.numberOfRowsVisible + 10, self.maxRows);
        [self.tableView reloadData];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say you retrieve 100 records, and display them on a page. The user only
I have a cfinvoke which writes to a table like 200,000 records. Then I
I'd like to have the width of my table 100% of screen width -
I'm sure it's something simple, but I have over 100 errors like: and: I
I have a table that looks like this: id count 1 100 2 50
I have a table with about 20+ million records. Structure is like: EventId UNIQUEIDENTIFIER
I have record in table like 'abc 100% text'. I want to search all
I have the list with like 100,000 site link strings Each link is unique,
I have template that looks like this: 100 template<size_t A0, size_t A1, size_t A2,
I have a text file looks like this : 100 50 20 90 4.07498

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.