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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:50:01+00:00 2026-06-16T22:50:01+00:00

I have a splitView in my app.I have a presented a Modal on click

  • 0

I have a splitView in my app.I have a presented a Modal on click of button from the splitview’s detailview.In that modal I have opened popover which contains splitview’s rootview controller(which contains tableview).

Now I want to dismiss that modal view on didSelect of popover’s tableview.But it does not dismiss.
I have searched a lot for this and tried , but could not get any solution.

My Tried code is as follow:

//DetailView (Presented ModalView).m

    -(IBAction)popOverBtnPressed:(id)sender
    {
        LeftSideVCViewController *popUp=[[LeftSideVCViewController alloc] initWithNibName:@"LeftSideVCViewController" bundle:nil];

        popView = [[UIPopoverController alloc]initWithContentViewController:popUp];
        popView.delegate =self;
        [popView setPopoverContentSize:CGSizeMake(300, 700)];
        [popView presentPopoverFromRect:CGRectMake(150,5,20,40) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

    }


    -(void)dismissModal
    {
        [self dismissViewControllerAnimated:YES completion:nil];
    }


   // LeftSideView.m

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
        DetailView *d=[[DetailView alloc]init];   
       [d dismissModal];
    }

// GridView.m

Presenting DetailView from a view (GridView)

-(IBAction)Grid_buttonPressed:(id)sender {

DetailView *rd=[[DetailView alloc]initWithNibName:@"DetailView" bundle:nil];
rd.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    [self presentModalViewController:rd animated:YES];
}

How to do this ?
Thanks.

  • 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-16T22:50:02+00:00Added an answer on June 16, 2026 at 10:50 pm

    By writing DetailView *d=[[DetailView alloc]init] u instantiate another instance of DetailView.
    The way out in this situation would be creating a delegate for LeftSideView

    Somewhere above:

    DetailView *instanceDV = [DetailView new];
    LeftSideView *instanceLSV = [LeftSideView new];
    instanceLSV.delegate = instanceDV;
    

    And then:

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
    
    if([self.delegate respondsToSelector:@selector(dismissModal)])
       [self.delegate dismissModal];
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPad app with a SplitView. On the left (in the RootView)
I have used the template from ipad to create a splitView app but the
I have an OS X app that uses a splitview with two embeded NSTableViews.
I have a UITableView for my MasterView of SplitView app. On selecting any row,
I have an app that I just got setup with a split view controller
I have an app that needs backgrounds for both parts of the split view.
I have a window which contains a split view. One of the splits contains
I have a split view-based app that presents a master-detail interface, and uses a
For the app that i am developing i have used a UISplitViewController as my
I have an app created from Xcode 4.5's boilerplate Master-Detail Application with CoreData, StoryBoards

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.