Q:

Show date from Parse database in UITableView section header

I'm building an app that retrieves items from a Parse database and inserts them into a UITableView. In my Parse database, each item has its own date (i.e. film dates). Now this is the part I’m having trouble with:
I would like to sort the items by their own date, with the date for that item being in the section header. I would also like to show only the items whose date is from the current date and onwards. Please also know that I’m using the latest version of iOS and using Objective-C. I have exhausted other sources but have yet to find exactly what I need. Any guidance will be greatly appreciated!
Right now I have this in my ShowsTableViewController.m:
My getShows method: 
-(void)getShows{
    PFQuery *retrieveShows = [PFQuery queryWithClassName:@"shows"];

   [retrieveShows findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError
*error) {
   //NSLog(@"%@", objects);
   if (!error)
   {
       _showsArray = [[NSArray alloc] initWithArray:objects];
   }

   [showsTableView reloadData];

}];
}

And this is how I'm currently populating the cell:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ShowsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"showsCell" forIndexPath:indexPath];

    PFObject *tempObject = [_showsArray objectAtIndex:indexPath.row];

    cell.cellTitle.text = [tempObject objectForKey:@"title];

    return cell;
}

A:

With you require, I think you have to sort your data and put it in to a Array. And this Array will hold list of Dictionary. Each Dictionary will have two key (first key is title: and value of it is title you want show to header, second key is data: and value of it is array item in seciton) 
And now you will implement UITableViewDataSource for it:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
     return [self.listData count];
}

for each section you can implement same like this:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

   NSArray *data = [[self.listData objectAtIndex:section] objectForKey:@"data"];
}

And show header:
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
     return [[self.listData objectAtIndex:section] objectForKey:@"title"];
}

And show to cell:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
   ShowsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"showsCell" forIndexPath:indexPath];

   PFObject *tempObject = [[self.listData objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];

   cell.cellTitle.text = [tempObject objectForKey:@"title];

   return cell;
}  

You can do this way to achieve what you want.    

