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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:10:33+00:00 2026-06-04T22:10:33+00:00

I want to create a modal view with the navigation item (right view on

  • 0

I want to create a modal view with the navigation item (right view on my screenshot) and I want it to have a ‘back button’. My app is TabBar application and I don’t want this view to have a tab bar, but I want to load a previous view (left view on my screenshot) with a segue similar to the type “push”.
I can only create push segue to provide right navigation back to the view on the left, if it’s loaded as a modal view, the NavigationBar & TabBar are gone. Any workarounds for this?
Thanks in advance!

Here's my screenshot

  • 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-04T22:10:34+00:00Added an answer on June 4, 2026 at 10:10 pm

    Just put a Navbar on the new view with a bar button item. Create an action for the bar button item by control dragging from the bar button item to the .h of the view controller. You can then use a delegate and protocol method to tell the first controller when the button has been pressed and have it use [self dismissModalViewControllerAnimated:YES];

    So in your second view create a protocol with a method done, like this:

    @protocol SecondViewControllerDelegate <NSObject>
    
    -(void) done;
    
    @end
    
    @interface SecondViewController : UIViewController {
        ...
        id delegate;
    }
    
    ...
    
    @property (nonatomic, assign) id<SecondViewControllerDelegate> delegate;
    
    -(IBAction)done:(id)sender;  //this will be linked to your nav bar button.
    @end
    

    then in your action from your button call this:

    -(IBAction)done:(id)sender{
       [self.delegate done];
    }
    

    Your first view controller will need to implement the protocol <SecondViewControllerDelegate>

    then in your first view controller, set it up as a delegate for your second view controller before you segue.

    -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
        if([[segue identifier] isEqualToString:@"Second View Modal Segue Identifier"])
        {
            SecondViewController *viewController = segue.destinationViewController;
            viewController.delegate = self;
        }
    }
    

    lastly, catch the done call from the delegate in your first view controller:

    -(void) done
    {
        [self dismissModalViewControllerAnimated:YES];
    }
    

    That’s how I have done it. If you don’t have a lot of experience with protocols and delegates it may seem confusing at first, but it has worked well for me.

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

Sidebar

Related Questions

I have create an IOS app. The app has MainViewController that will present/dismiss Modal
I have a modal view controller whose view comes from a XIB. I want
I have a navigation problem. I want to create the following navigation structure: Start
I want to create a modal dialog that has more controls than what a
I want to be able to create modal dialogs, with, for example close: function()
I have a form where I create a model and I want a dialoge
I have a navigation controller with a table view. In most tutorials I've read
I have a modal view controller that creates core data changes in it's own
I have a tab bar + navigation based app and I'd like to launch
I have a modal view controller that is displayed using: [self presentModalViewController:addStoryItem animated:YES]; on

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.