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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:42:47+00:00 2026-05-31T11:42:47+00:00

I have pre allocated the mail and messaging controllers on startup in my app

  • 0

I have pre allocated the mail and messaging controllers on startup in my app delegate to save the initialisation time (over 10 secs) when the user is using my application…

__mailController = [[MFMailComposeViewController alloc] init];
__messageController = [[MFMessageComposeViewController alloc] init];

It works fine the first time the controller is displayed then the next time the message is not changed and the old message is still displayed ?? … Is it likely that the controller is being deallocated ??? Strange as the views work correctly just that the message is not correct ?

- (IBAction)actionSMS:(id)sender {

if([MFMessageComposeViewController canSendText])
{
    self.messageController.body = self.MessageDetail.text;
//      controller.recipients = [NSArray arrayWithObjects:@"+919999999999", nil];
    [self presentModalViewController:self.messageController animated:YES];
}
}
  • 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-31T11:42:48+00:00Added an answer on May 31, 2026 at 11:42 am

    Once MFMailComposeViewController and MFMessageComposeViewController are presented to the user you can’t make changes to the content they display.

    MFMailComposeViewController Class Reference:

    Important The mail composition interface itself is not customizable
    and must not be modified by your application. In addition, after
    presenting the interface, your application is not allowed to make
    further changes to the email content.
    The user may still edit the
    content using the interface, but programmatic changes are ignored.
    Thus, you must set the values of content fields before presenting the
    interface.

    That means those values are somehow locked in the implementation of the MFM*ViewController at the moment you present the controller. So you can’t reuse these viewControllers. iOS doesn’t care if the controller is, like in your case, invisible or not. If it is presented the content is locked.

    I would figure out why it takes 10 seconds to allocate them. And then dump that whole pre-allocation thingie. 10 seconds are definitely to much.

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

Sidebar

Related Questions

I have a project that comprises pre-build Dll modules, built some time in the
I have an unmanaged DLL that gets called from .NET with pre-allocated buffers to
Right now my app uses a pre-allocated NSMutableArray of ~40000 objects. When the app
I have a lot of pre-existing BMPs (and our clients have pre-existing bmps as
I have a pre tag within my page that contains quite a bit of
I have a pre-made SQLite database that I am downloading from the net via
I have a couple of pre-existing applications which I need to run in one
I have all my content pre-escaped, so rather than using the triple stash everywhere
I have the following couple of C pre-processor macros for creating test functions: //
I have a form that I pre-populate with test data though jQuery. $('INPUT[name=subscription.FirstName]').val('Jef'); but

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.