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

  • Home
  • SEARCH
  • 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 7781899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:22:23+00:00 2026-06-01T19:22:23+00:00

I am using a UISplitViewController on ARC . I setup the controller in my

  • 0

I am using a UISplitViewController on ARC.

I setup the controller in my AppDelegate, then make it the rootViewController. I have made sure to make it a property:

@property (strong, nonatomic) UISplitViewController *splitViewController;

Setting the root and detail using the viewControllers property works fine when first creating. And it works fine again when setting a second time, but I get a crash on the third time I try setting the viewControllers property.

Here is how I set those:

    Screens *edit = [[Screens alloc] initWithStyle:UITableViewStyleGrouped];
    UINavigationController *c = [[UINavigationController alloc] initWithRootViewController:edit];

    if ([Utility isIpad]) {
        Map *a = (Map *)[[MyAppDelegate instance].splitViewController.viewControllers objectAtIndex:0];
        NSArray *viewControllers = [NSArray arrayWithObjects:a, c, nil];
        UISplitViewController *splitView = [MyAppDelegate instance].splitViewController;
        splitView.viewControllers = viewControllers;// <--- Crashes here
    } else {
        [self presentModalViewController:c animated:YES];
    }//end

Why would it crash when I try to set the viewControllers property? It almost seems like it is released, but I know that the splitViewController is still there…

Could this be something to do with ARC?

Stacktrace:

enter image description here

  • 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-01T19:22:25+00:00Added an answer on June 1, 2026 at 7:22 pm

    I had the same error just now. In my case the problem was that I had originally set up the detail view controller to be a delegate of the UISplitViewController. Then I refactored to make the root view controller handle things, but I forgot to remove the connection from the .xib file.

    So, when I set splitView.viewControllers the first time everything worked, but then my original detail controller would get released and the UISplitViewController was left with a bad pointer as delegate. The next time I set the viewControllers property, the UISplitViewController tried to call its delegate through the pointer and crashed.

    You write that you set up the controller in your app delegate, so this may not be exactly the same problem you had. Still, double check to make sure the delegate property of the UISplitViewController is set correctly!

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

Sidebar

Related Questions

I am developing for iPad and have created a standard UISplitViewController application using the
When using a UISplitViewController in portrait , I have a settings popover that I
When using the standard UISplitViewController setup, there's a toolbar/navigation bar at the top of
I'm currently using UISplitViewController as my app's rootViewController. To present progress dialogs I use
I have a universal app, and on the iPad version I'm using UISplitViewController to
In my AppDelegate I setup my splitview using the xcode4 template. The code is
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
When using UISplitViewController on the iPad there's a black vertical divider line between the

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.