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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:47:14+00:00 2026-06-08T05:47:14+00:00

I have a very strange issue here. I am using a present modal view

  • 0

I have a very strange issue here. I am using a present modal view controller to display my MFMailComposer ViewController on top of a ViewController which is placed with in a Navigation Bar.

[self presentModalViewController:emailviewController animated:YES];

to hide , I use …

-(void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
{

    [self dismissModalViewControllerAnimated:YES];
}

Everything works fine but when I dismiss my MailComposer the original view controller hides behind the status bar .

I have tried to modify view offset by 10 using setFrame method but It din’t worked . (this is tired before and after the modal view controller is presented and dismissed )

I have tried by hiding status bar temporarily but didn’t worked.

I have tried self.navigationcontroller presentmodalviewcontrolle but that didn’t worked too…

Any ideas or suggestions would be highly appreciated

After dismissmodalviewcontroller called

edited : Most of the people give me a suggestion to modify the offset manually.
Well that does not work . Because if I do that in my viewDidLoad/viewWillapper of the original viewcontroller method then It shifts my view before the present modal view controller whereas after I load the modal view controller It becomes normal.

  • (void) viewDidAppear: (BOOL) animated {
    CGRect frame = self.navigationController.view.frame;
    frame.origin.y = 20;
    self.navigationController.view.frame = frame;
    }

Changing offset results in this

  • 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-08T05:47:16+00:00Added an answer on June 8, 2026 at 5:47 am

    Try putting this in ViewDidAppear:

    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
    

    Worst case, if it is always happening only after the modal view controller is dismissed, declare a boolean for afterFirstLaunch in the .h and put this in viewDidAppear:

    if(afterFirstLaunch){
          CGRect frame = self.navigationController.view.frame;
          frame.origin.y = 20;
          self.navigationController.view.frame = frame;
    }
    else {
          afterFirstLaunch = true;
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have come across a very strange issue in python. (Using python 2.4.x) In
I have a very strange issue, that I'm hoping someone here can help me
I have a very strange issue with the tableview: I have a table cell
I have a very strange issue. I have an open WebSocket, the communication works
I have a very strange issue on my hands. I have two IIS websites
I am facing a very strange issue. I have a SharePoint webpart that displays
I have very strange issue. In my WP7 app I have a pivot control
I have a very strange issue with GZIPOutputStream when compressing an array of doubles.
At the moment I have a very strange issue regarding locking a dictionary. I
I have a very painful issue here, if some one could help ? 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.