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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:32:36+00:00 2026-05-30T17:32:36+00:00

what do I have to do, to show a navigationbar in a view, that

  • 0

what do I have to do, to show a navigationbar in a view, that is presented via presentModalViewController?

I call the presentModalViewController from code.

When I segue to the same view in a storyboard, whitch in this case is embedded in a navcontroler, everything works fine.

Thx
Mica

  • 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-30T17:32:38+00:00Added an answer on May 30, 2026 at 5:32 pm

    You need to add a nav bar to a controller when presenting modally

        UIViewController* myViewController = [[UIViewController alloc] init];
    UINavigationContoller* navController = [[UINavigationController alloc] initWithRootViewController:myViewController];
    [self presentModalViewController:navController animated:YES];
    

    Then in myViewController’s viewWillAppear method you can setup the a dismiss or close button for the modal controller.

    Another way to do it if you are using a Storyboard is to just get the storyboard by name and instantiate the controller by identifier.

    UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"storyboard" bundle:nil];
    [storyboard instantiateViewControllerWithIdentifier:@"myViewController"];
    

    In the second example myViewController is a UINavigationController in the storyboard file.
    I’m assuming ARC for all the code.

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

Sidebar

Related Questions

I have a detail view that is pushed from a map. I am trying
I have created a flexible navigation bar in my app that will show custom
I have some text in a UITextView, that I would like to have show
I have to show a label with font size = 14 when the view
I have to show records in such a way that some selected records should
I have a view based app that works well. (In other words, I'm not
hello all i am using this code to show flip animation...... i have a
Hi on our dev environment we have show all errors, warnings and notices. I'm
I have a Show table, and I would like to have a derived type
I have Divs show and hide (with an animation) using the following script (I

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.