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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:09:30+00:00 2026-06-12T09:09:30+00:00

In my App i am loading the table with events (from server), where i

  • 0

In my App i am loading the table with events (from server), where i am sorting them by date wise and showing in sections with header title as the date of event. Now my requirement is(because of lot of records) to load 20 by 20 records and they must be in sorted order with sections.

  • 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-12T09:09:31+00:00Added an answer on June 12, 2026 at 9:09 am

    I assume that you are loading data with Rest web service. Somewhere on server you need to have an SQL statement to load events

    SELECT * from events order by date ASC LIMIT page,20
    

    Where page is the number of page you are loading.
    Your iPhone app will start with:
    1- int page = 0;

    2- Create a NSMutableDictionary to store all events retrieved by page.

    3- Sending request to the REST resource with post method and a page parameter (page = 0).

    4- We are sure to get 20 (or less) events.

    5- for each new event data, create an NSMutableArray and store it on our mutable dictionary with the key the event date.

    6- Whenever adding new event to the dictionary, check if the dictionary has a key with this event date, if yes add the event to the mutable array with that key, else create new mutable array and add the event to it then add it to the dictionary with the event date.

    7- Display the table view with header titles the keys, number of section:

    [[eventDictionary allKeys] count];
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
            //fetch the event for this cell;
            NSString *sectionKey = [[eventDictionary allKeys] objectAtIndex:indexPath.section];
            NSMutableArray *thisSectionEvents =  [eventDictionary objectForKey: sectionKey];
            Event *event = [thisSectionEvents objectAtIndex.row];
    
    
            //Create your customcell here and pass data to it.
    }   
    

    8- load next page:

    8-a- page++

    8-b send request with the new page value

    8-c add new events to the Mutable dictionary that contains already the 20 first events;

    8-d reload data on table view

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

Sidebar

Related Questions

I have a html wrapper app loading all js, css and images from ipad
I have an iPad app that is not showing a table created programmatically. Where
Hi friends I am getting images from webservice and loading these images in table
I'm having trouble loading data from sqlite database into a detailed view. The table
i am using hibernate as ORM tool, and while loading the data from table
I'm loading many images from a server, and can't hammer the server with all
How can I delay the app loading to show the splash screen for longer?
When my app is loading data in an AsyncTask , it shows a splash
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
My app is crashing after loading thumbnails. On this line the code is downloading

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.