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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:23:10+00:00 2026-06-05T05:23:10+00:00

I have a UINavigationController and on the UINavigationBar i have a Button. When i

  • 0

I have a UINavigationController and on the UINavigationBar i have a Button. When i press this Button, a new UINavigationController is presented modally as a UIModalPresentationFormSheet. This works.

But i recognized that the presentation of the FormSheet is quite time consuming. I put two logs in the action method (“start” and “finish”, see code below), one in the first and one in the last line. The log time tells me, that it takes about 1,5 to 2 seconds to run this code.

Thats the Action method called from the UINavigationItem:

- (IBAction)addBtnPressed:(id)sender{
  NSLog(@"start");

  FooViewController *fooContr = [[FooViewController alloc] init];
  fooContr.delegate = self;
  UINavigationController *navContr = [[UINavigationController alloc] initWithRootViewController:fooContr];
  [fooContr release];
  navContr.modalPresentationStyle = UIModalPresentationFormSheet;

  [self.navigationController presentModalViewController:navContr animated:YES];

  [navContr release];

  NSLog(@"finish");

}

It seems that the line

 [self.navigationController presentModalViewController:navContr animated:YES];

takes 90% of the time.

Does anybody know whats going on here and how to optimize that?

  • 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-05T05:23:12+00:00Added an answer on June 5, 2026 at 5:23 am

    Preload the UINavigationController with the FooViewController so when you present it it is already in memory.

    What it is probably taking so much time is the loading of the FooViewController instance’s view.

    You can make it load by doing something to it. Like

    UIView *view = fooContr.view;

    You should do this before the button that presents the modal view controller gets clicked. Otherwise it will probably have the same effect.

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

Sidebar

Related Questions

I currently have a UINavigationController based application that works just fine. I'd like to
I have created a UINavigationController with a UINavigationBar that has a UIBarButtonItem in the
I have a UINavigationController that has its left and right button properties set. Instead
In my application, I have a UINavigationController with a UINavigationBar that I created programmatically.
I have UINavigationController and UIViewController, then I push another viewcontroller, but I don't need
I have a UINavigationController and I have seperate UIViews that I switch between using
I have a UINavigationController. On the right top i have a button on click
If you have a UINavigationController's UIViewController present a UITableViewController (TVC) modally, is there a
i have the following code to customize UINavigationController : @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect
I have a UINavigationController that I'm creating programatically: MessageTableViewController* homeStream = [[MessageTableViewController alloc] initWithNibName:@MessageTableViewController

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.