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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:00:01+00:00 2026-05-26T03:00:01+00:00

my app is in landscape mode, when i open the email sheet, that is

  • 0

my app is in landscape mode, when i open the email sheet, that is in portrait-and its ok, the keyboard is opened in landscape,so i have portrait email sheet,and landscape keyboard.

How do i fix it , that the keyboard will be in in portrait also ?
WHY when pressing “cancel” , its not going back to the app and nothing happens ?

//send email log-------------------------
        NSLog(@"mail");
        [[CCDirector sharedDirector] pause];

        picker = [[MFMailComposeViewController alloc] init];
        picker.mailComposeDelegate = self;

        //Fill in the email as you see fit
        NSArray *toRecipients = [NSArray arrayWithObject:@"r@gmail.com"]; 
        [picker setToRecipients:toRecipients];


        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *dataPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"BetaTest.txt"];
        NSData *data = [NSData dataWithContentsOfFile:dataPath];
        [picker addAttachmentData:data mimeType:@"text/txt" fileName:@"BetaTest.txt"];

        NSString *emailBody = @"test :) ";
        [picker setMessageBody:emailBody isHTML:NO];
        [picker setSubject:@"hardware test##"];

        //display the view
        [[[CCDirector sharedDirector] openGLView] addSubview:picker.view];
        [[CCDirector sharedDirector] stopAnimation];    
  • 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-26T03:00:01+00:00Added an answer on May 26, 2026 at 3:00 am

    Instead of adding the view of the MFMailComposeViewController instance to your currently active view, you’ll need to display it as a modal view controller. Unfortunately, cocos2d (which I assume you are using from the CCDirector class you have in your code) isn’t built on top of the default UIKit displays.

    This means you’ll have to find your application’s root view controller and call its presentModalViewController: method. There are several ways to do this, for example the method detailed in this blog post (written by someone else, but a decent approach): http://indiedevstories.com/2011/06/25/modal-view-controllers-in-cocos2d/

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

Sidebar

Related Questions

My android app works on landscape mode. I have a listview that contains some
I have an app that is in portrait mode, but some screens should have
I have an TabBar app that I would like to be in landscape and
I have set my iPad app to Landscape mode using following code.. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
I have a strange problem. My app keeps starting in landscape mode. If I
I have main menu in my app supporting only landscape mode. I implement landscape
I have an app which displays in landscape mode and I've overwritten the height
I have a tab-based Android app. Currently, it does not support landscape mode -
I have put my iPhone app in landscape mode and I want to put
I want to use my app both the portrait and Landscape Mode , 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.