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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:01:59+00:00 2026-05-29T18:01:59+00:00

I have implemented a MGSplitViewController where I have 6 rows in the masterviewcontroller and

  • 0

I have implemented a MGSplitViewController where I have 6 rows in the masterviewcontroller and each one loads a new UIViewController into the detailviewcontroller – I have followed Apples example project on using multiple detail view controllers. But I am having a couple of weird problems with it.

Firstly, upon the initial load the first selected detailviewcontroller displays perfectly. However, when I select different rows in the masterviewcontroller to change the detail view controller the row is selected but the detailviewcontroller does not change – this continues on like this for several clicks – then everything works fine.

Well almost, now when the new detailviewcontroller actually loads sometimes the views become overlaid. For instance if I first select a detailviewcontroller with a tableview and then select one that just has some buttons in it – the buttons appear overlaid onto of the tableview. If anyone can understand what I am doing wrong please let me know. Here is my did selectrow method.

- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    /*
     Create and configure a new detail view controller appropriate for the selection.
     */

    switch (indexPath.row) {
        case 1:
        {
            self.splitViewController.detailViewController = self.postViewController;
//            popover = [[UIPopoverController alloc] initWithContentViewController:self.postViewController];
//            [popover presentPopoverFromRect:CGRectMake(200, 0, 100, 100) 
//                                     inView:self.splitViewController.view 
//                   permittedArrowDirections:UIPopoverArrowDirectionAny 
//                                   animated:YES];
            break;
        }
        case 2:
            self.splitViewController.detailViewController = self.latestViewController;
            break;
        case 3:
            self.splitViewController.detailViewController = self.categoriesViewController;
            break;
        case 4:
            self.splitViewController.detailViewController = self.messagesViewController;
            break;
        case 5:
            self.splitViewController.detailViewController = self.searchViewController;
            break;
        case 6:
            self.splitViewController.detailViewController = self.accountViewController;
            break;
        default:
            break;
    }
}
  • 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-29T18:02:02+00:00Added an answer on May 29, 2026 at 6:02 pm

    There seems to be a bug in MGSplitViewController where it doesn’t remove the previous detailViewController’s view. To solve this, add the following line above your switch statement:

    [self.splitViewController.detailViewController.view removeFromSuperview]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a python webserver. Each http request spawns a new thread. I
i have implemented galleryview in one screen named display_image.xml in which i have shown
I have implemented a JSF validator based on this example . How can I
I have implemented a multi-threaded program which involves spawning a thread for each user,and
I have implemented the Google map successfully. But one more thing has left to
I have implemented what I thought was a pretty decent representation of MVC in
I have implemented a simple file upload-download mechanism. When a user clicks a file
I have implemented a SAX parser in Java by extending the default handler. The
I have implemented VirtualPathProvider class so I can keep all my views in the
I have implemented tracing based on System.Diagnostics. I am also using a System.Diagnostics.TextWriterTraceListener, 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.