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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:19:39+00:00 2026-06-17T09:19:39+00:00

I am using a Split View Controller and showing a modal window when a

  • 0

I am using a Split View Controller and showing a modal window when a button is tapped in the master pane. I need to be able to dismiss the window when the user taps outside of the bounds of the window.

I am currently using presentViewController, which I have read does not allow for taps outside of the window.

I think I need to present a view controller myself and setup a gesture recognizer to handle the closing from there… the trouble is, I don’t know where/how to present the view controller or where to attach the gesture recognizer to in an SVC.

I setup my view controller like this:

SearchViewController *searchViewController = [[SearchViewController alloc] initWithStyle:UITableViewStylePlain];

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:searchViewController];

[navController setNavigationBarHidden:NO]; 

From there I don’t know how to make the view controller appear without using presentViewController. I have tried the following (each separately):

[[self navigationController] addChildViewController:navController];

[self.view.window.rootViewController addChildViewController:navController];

[self.presentingViewController addChildViewController:navController];

[self.presentingViewController.presentingViewController addChildViewController:navController];

How do I present my navcontroller, and which view would I add a gesture recognizer to?

  • 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-17T09:19:40+00:00Added an answer on June 17, 2026 at 9:19 am

    A UIPopoverViewController will work.

    Alternatively, you can add a child view controller to your RootViewController. . (Check out UIViewController containment for lifecycle handling).

    Basically just this in your root view controller:

    - (void) presentSemiModalViewController 
    {
       //Tint-out the background or blur it with some effect        
    
        _semiModalViewController = viewController;
        //Choose the frame you'd like to use here, and an animation you'd like to use to present it
        [self.view addSubView:_semiModalViewController.view];
        [_semiModelViewController willMoveToParentViewController self];
    
    
    }
    

    If the RootViewController is not yours (eg a UINavigationController) you can use a category, but to retain the _semiModalViewController you’ll need to use an associative reference (ie add a “property” to the category to store the modal VC while its in use). For info on that see here: Associative References Info

    PS: You might want to choose a better name my “semi-modal”, but you get the idea 😉

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

Sidebar

Related Questions

When using a spilt view controller, I have a Master and Detail View. When
I have to create a list of list using split view controller in IPad,
I am working with a split view controller with a master and detail view.
I am using split view controller in my project, in the split view i
I am using a split view controller in an iPad app I am trying
I am using the split view template to create a simple split view that
I have a split view app running fine on the iPad. It is using
I'm new to using the split view for creating iPad applications. When I first
I'm using the template master detail application. I have added a modal segue from
I want to have UIPageViewController in my Split view controller. So i have created

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.