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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:41:10+00:00 2026-05-28T05:41:10+00:00

If I push a view onto the Navcontroller it works great and I can

  • 0

If I push a view onto the Navcontroller it works great and I can return from it either with code or using the Nav Controller back button.

Then I change it to present the view modally. The preset works but I cant get it to return and dismiss the modal view.

This works… main view

   Tools *screen = [[Tools alloc] initWithNibName:@"Tools" bundle:[NSBundle mainBundle]];

     [mainNavController pushViewController:screen animated:YES];

    [screen release];

One the modal view:

- (IBAction)btnCancel:(id)sender {


  [self.navigationController popToViewController:[self.navigationController.viewControllers  objectAtIndex:0] animated:YES];


}

But then I change it to modal like this on the modal view it does not go back to the main view.

Tools *screen = [[Tools alloc] initWithNibName:@"Tools" bundle:[NSBundle mainBundle]];

 [mainNavController presentModalViewController:screen animated:YES];

  [screen release];

On the modal view:

- (IBAction)btnCancel:(id)sender {


    [self.parentViewController dismissModalViewControllerAnimated:YES];


}

I have tried about everything I can think of, obviously I am missing something! Any ideas?

thanks for any help!!

  • 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-28T05:41:11+00:00Added an answer on May 28, 2026 at 5:41 am

    dismiss the modal view from self (modal view)

    [self dismissModalViewControllerAnimated:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I push a view onto the navigation controller the back button's title get's
Possible Duplicate: Why can't I push a new view controller onto the current view?
I want to push a view controller onto the stack, then pop the first
I'm using a navigationController to push a new view onto the stack. Once I'm
I am trying to push in a new view controller with the code: [self.navigationController
I now know that If you push a view controller onto a navigation controller
I am using UINavigationController to push and pop a view. I used [[self navigationController]
I've got a parentViewController with a navigation controller. I push a view on the
If I push a view onto a navigationController and present it modally, is it
I am presenting a TTWebController as a Modal View using this code: TTNavigator* navigator

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.