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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:15:13+00:00 2026-06-18T14:15:13+00:00

i implemented a split view in my app. When my app launch it shows

  • 0

i implemented a split view in my app. When my app launch it shows fine.

masterview=Leftside view & detailView = Home view

But my master view also contains 2 Table view. when i clicked the any row of table view, the detail view(Now, class view) is not get display.

Mean i want to disply display mutiple detail view as per master view’s table row selected.

my code for split view is as follow:

// AppDelegate.h

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

LeftViewController *masterViewController = [[LeftViewController alloc] initWithNibName:@"LeftViewController_iPad" bundle:nil] ;
        UINavigationController *masterNavigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController] ;

        HomeViewController *detailViewController = [[HomeViewController alloc] initWithNibName:@"HomeViewController_iPad" bundle:nil];
        UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController];


        masterViewController.home_Detail = detailViewController;

        self.splitViewController = [[UISplitViewController alloc] init] ;
        self.splitViewController.delegate = detailViewController;




        self.splitViewController.viewControllers=[NSArray arrayWithObjects:masterNavigationController,detailNavigationController, nil];

        self.window.rootViewController = self.splitViewController;

        [self.window makeKeyAndVisible];
}



//LeftView.m

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{


    [self.appDelegate.splitViewController viewWillDisappear:YES];
    NSMutableArray *viewControllerArray=[[NSMutableArray alloc] initWithArray:[[self.appDelegate.splitViewController.viewControllers objectAtIndex:1] viewControllers]];

    [viewControllerArray removeAllObjects];

    if (tableView==tbl_class) 
    {

       self.class_VC=[[Class_Vice_ViewController alloc]initWithNibName:@"Class_Vice_ViewController" bundle:nil];


        [[NSUserDefaults standardUserDefaults]setInteger:[[[classNames objectAtIndex:indexPath.row]valueForKey:@"class_id"]intValue] forKey:@"psel_class"];

        NSLog(@"%d",[[[classNames objectAtIndex:indexPath.row]valueForKey:@"class_id"]intValue]);



        [viewControllerArray addObject:self.class_VC];
        self.appDelegate.splitViewController.delegate = self.class_VC;

        [[self.appDelegate.splitViewController.viewControllers objectAtIndex:1] setViewControllers:viewControllerArray animated:NO];
        [class_VC viewWillAppear:YES];

    }
}

Help me to Solve this issue

  • 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-18T14:15:14+00:00Added an answer on June 18, 2026 at 2:15 pm

    The offending line is this one in the didSelectRowAtIndexPath: method:

    [self.appDelegate.splitViewController viewWillDisappear:YES];
    

    I don’t know why you put that in, but if you remove it, it should work. You also don’t need this line:

    [self.class_VC viewWillAppear:YES];
    

    While it is quite common to override viewWillAppear: and viewWillDisappear:, you almost never call them like you’re doing.

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

Sidebar

Related Questions

In principle I want to implement a split view. But I need the master
I have a split view controller in my Ipad app, in which the detail
I have implemented an app in iphone using sencha touch & phone gap .
In my app, I have a split screen in which the detail view is
I have been trying to add/implement this example to my existing Split View app
I Have implemented Split view model in Jquery mobile + phone gap by following
I have implemented a left side list view in split view using the following
When I use replace detailView segue app crashes. I'm replacing a bunch of view
I have implemented a custom split view controller which — in principle — works
I implemented the Facebook registration on my website. Everything works fine except that suddenly

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.