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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:36:23+00:00 2026-06-13T10:36:23+00:00

I created a project using the master detail application template. The project is targeted

  • 0

I created a project using the master detail application template. The project is targeted for both iphone and iPad.

My Master View contains a table view controller that is populated from DB data. No problems so far.

In the detail view I replaced the default view controller with a Collection view controller. I want for every row in the master table view to create a number of cells in the collection view.

Now in the storyboard, the iphone version has a segue between the table & collection (master/detail) controllers and everything works fine.

MasterViewController.m    
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([[segue identifier] isEqualToString:@"showDetail"]) {
        NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
        Inbound *current = inbounds[indexPath.row];
        [[segue destinationViewController] setDetailItem:current];
    }
}

My custom object “Inbound” is being passed from the master to the detail view. When this occurs, the detail/collection view controller updates the cells.

DetailViewController.m
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
   //Go round the DB and update the cells
}

My problem is in the Split view of the iPad version. There is a relationship instead of a segue between master and detail view, in the storyboard. The only code that is executed when I select a table row is this:

MasterViewController.m
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
        Inbound *current = inbounds[indexPath.row];
        self.detailCollectionViewController.detailItem = current;

        NSLog(@"%@",@"table cell clicked");
    }
}

I can see that my custom “Inbound” object is being properly passed to the detail view controller. But for some reason, the collection view does not update.

Any ideas?

  • 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-13T10:36:24+00:00Added an answer on June 13, 2026 at 10:36 am

    On the iPhone version the new view is being pushed onto the screen, so one of your methods will be initialising the view based on the detailItem.

    In the iPad the detail view is already on the the screen. You need to ensure that your setter function for detail view will reload the data for the collection view – I’ll bet you’re not doing that at the moment…

    In other words, you need something like this (assuming ARC)

    - (void)setDetailItem:(Inbound *)detailItem
    {
        _detailItem = detailItem;
        [_collectionView reloadData];
    }
    

    Tim

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

Sidebar

Related Questions

I created a project using Master-Detail Application template but i don't need a MasterView.
Newbie question here ... I've created a Master-Detail Application project in Xcode 4.2 using
I created an iPhone project using the Core Data template. Now when I try
info: xcode 4.3.2, iOS5, using storyboard. Created project from xcode's Tabbed Application template. Did:
I just created a new project using the visual studio cordova starter template. However
I just created my first MVC2 project using the standard template. I need to
I succesfully created a project using seam credentials for authentication, but right now some
I successfully created a project using Wicket quickstart and turned it into an Eclipse
I have recently just created Java project using Eclipse that requires 2 JAR files
The documentation of my project (using Python 3.2) is created with Sphinx (1.1.3) and

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.