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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:39:24+00:00 2026-05-12T08:39:24+00:00

When starting the app, if the user doesn’t have login information stored, I want

  • 0

When starting the app, if the user doesn’t have login information stored, I want to display a modal view controller to force the entry of this information. I found through trial and error, that this had to occur in viewDidAppear of my root view controller. I tried to put it in viewDidLoad and viewWillAppear, but those didn’t work unless I assigned the view of the root view controller to the view of the navigation controller used in the modal which then caused other issues…

So I have:

- (void)viewDidAppear:(BOOL)animated
{
     NewAccountViewController *newAccountViewController = [[[NewAccountViewController alloc] initWithNibName:@"NewAccountViewController" bundle:nil] autorelease];

     UINavigationController *accountNavigationController = [[UINavigationController alloc] initWithRootViewController:newAccountViewController];
  [self presentModalViewController:accountNavigationController animated:YES];       
}

And in the newAccountViewController I have a simple navigation item button that dismisses the modal view controller with dismissModalViewController.

This all works and when the modal is dismissed a view in a navigation controller is visible with its navigation item title at the top….

But there is a white gap about the same size as the status bar between the status bar and the top of the blue navigation item bar. If I don’t do the modal, then the gap is never there. It only occurs after the modal is presented and dismissed. I’ve tried doing animated:NO on both the present and dismissModalViewController. I’ve also tried not using the navigation controller in the modal, and that did nothing as well. Any ideas would be great! 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-05-12T08:39:25+00:00Added an answer on May 12, 2026 at 8:39 am

    Turns out this was happening because I was calling my modalviewcontroller on the current view controller, but my view controller already had a another view controller loaded as a subview. Once I changed it to make the view controller in the subview, load the modal, then it went away. Thanks for all your help.

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

Sidebar

Related Questions

I have an issue with my app when starting an SimpleBaseGameActivity from another SimpleBaseGameActivity
I am starting to build my first Android app. I have reached the point
When starting a certain activity of my app, the user is welcomed with a
I have a drumming app that has user-moveable drums onscreen. The user is able
I have a view which is similar to the notes app - i.e. typing
In my app I have a number of small subviews. When the user taps
I am trying to change the starting program for a particular user. I have
I have set up push notifications successfully on my app but I want the
I'm starting developing a Facebook app with PHP SDK, I have a two doubs
Possible Duplicate: Starting iPhone app development in Linux? Is there a way to use

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.