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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:24:42+00:00 2026-06-05T19:24:42+00:00

I got the problem with the cancel button of MFMailComposeViewController. Here is my context

  • 0

I got the problem with the cancel button of MFMailComposeViewController. Here is my context

- (void)viewDidLoad
{
    [super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
   [[UIApplication sharedApplication] setStatusBarHidden:YES];
}

- (IBAction)showButtonDidTouch:(id)sender {
    if ([MFMailComposeViewController canSendMail]) {
         MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];
         mailViewController.mailComposeDelegate = self;
         mailViewController.modalPresentationStyle = UIModalPresentationFormSheet;
         [self presentModalViewController:mailViewController animated:YES];
         [mailViewController release];
}
}

I hid status bar at viewDidLoad and then called displayed mailViewController as present modal view controller. However, the problem is when the app in landscape mode and uikeyboard appears, the action sheet doesn’t show up when cancel button is tapped as image: http://img651.imageshack.us/img651/5489/screenshot20120514at114.png

The little red image at top-left corner is the action sheet. If I set statusbarhidden = NO, it shows up.

I appreciate your help, thank you

  • 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-05T19:24:45+00:00Added an answer on June 5, 2026 at 7:24 pm

    I was able to work around this issue (which I see as an iOS bug) by registering for UIKeyboardWillShowNotification. Whenever the keyboard is shown, I manually set the frame of my MFMailComposeViewController’s superview to +/- 20 (status bar height), depending on the orientation (landscape left or right). This is a pretty ugly hack, but it works for me for now.

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

Sidebar

Related Questions

Got a strange problem. The cancel button that normally is shown at the navigation
Well, I got problem here with opengl ES stuff (just started to learn about
I want to ask about strcpy. I got problem here. Here is my code:
ive got problem with update. here is mysql query.log 25474 Query UPDATE db_mail4u.dMailerQueue SET
Got problem with opening custom context menu using advanced user interactions API in Selenium
I got a strange problem with MFMailComposeViewController. The first time it is displayed using
Here's my latest problem with the iPhone SDK. I've got a UISearchBar and its
I got problem for sorting array of nsdate. so i have array of date
i got problem with my code and hopefully someone able to figure it out.
I got problem with sending data in Android using httpPost. I found some example,

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.