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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:58:28+00:00 2026-05-17T18:58:28+00:00

The premise is remarkably simple: I want to display a modal view in an

  • 0

The premise is remarkably simple: I want to display a modal view in an iPad app that uses a UISplitViewController.

The view hierarchy is straight-forward:

                                              /- TableViewController1
                     /- root:TabBarController -- TableViewController2
SplitViewController -
                     \- detail:CustomViewController

When I click on one of the table cells in TableViewController1, I open a modal view:

- (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)ip {
  UIViewController *vc = [[MyModalClass alloc] init];
  UINavigationController *nc = [[UINavigationController alloc]
                                initWithRootViewController:vc];
  nc.modalPresentationStyle = UIModalPresentationFormSheet;
  nc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
  [self presentModalViewController:nc animated:true];
  [nc release];
  [vc release];
}

This works just fine: the view appears. The problems start when I try to dismiss it in any orientation other than landscape.

In ModalViewController, the following method is triggered by a UITabBarButton in the navigation bar:

- (void) closeButtonInNavBarWasClicked:(id)sender {
  [self dismissModalViewControllerAnimated:true];
}

And THIS is where the problems start.

When this code is called, the modal view disappears, BUT: the TabBarController (the split view’s root view) is suddenly rotated and resized. The content is suddenly sideways, and partially covers the details view. The details view isn’t resized to be smaller, it’s just partially covered by the root view.

The only situation where this problem doesn’t appear is when I tap on the TableViewController1 cell when the app is in portrait mode. Despite the root view being in a popover (which could be an ample source of bugs), everything works fine.

Some things I have already tried, with no success:

  • Dump the tab bar, just display TableViewController1 as the root controller of the split view
  • Create a delegate protocol so that the parent TableViewController1 dismisses the modal view rather than the MyModalClass view itself.
  • Presenting/dismissing the modal view on TableViewController1.splitViewController actually makes things worse: the view doesn’t even appear.
  • Sacrificing several goats also did not help.

I would hugely appreciate any input on 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-05-17T18:58:28+00:00Added an answer on May 17, 2026 at 6:58 pm

    I have a sort-of-answer to my own question: I used Instruments to systematically eliminate all memory leaks in my app. Once I had done that, the problem vanished.

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

Sidebar

Related Questions

The basic premise of my app is that when it loads it hides the
Pretty simple premise. I've got a floating image and I want to reveal the
I want to premise that this question's purpose is checking if there's at least
Premise: I want to take a chunk of html off of a document, and
Premise: This Wikipedia page suggests that the computational complexity of Schoolbook long division is
Premise Hi, I received multiple reports from a Redis user that experienced server crashes,
The basic premise is I want to find a character following another and then
Part of an on premise app I am moving to the cloud, displays TV
Motivation: I'm working on an app that makes several (client) phones read audio data
I have a Dynamics CRM 2011 on-premise installation and I want to retrieve records

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.