Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes All Three are possible, however #2 would either require using a private API or some hackery. I took the approach of subclassing MFMailComposeViewController as below</p> <pre><code>// file: CustomMailComposeViewController.h @interface CustomMailComposeViewController : MFMailComposeViewController { } @end // file ustomMailComposeViewController.m #import "CustomMailComposeViewController.h" @implementation CustomMailComposeViewController -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; //Here we replace the cancel button with a back button (Question #3) UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(backButtonPressed:)]; self.navigationBar.topItem.leftBarButtonItem = backButton; [backButton release]; //Here we disallow the user to change to to: cc: bcc: and subject: feilds (Question #2) //Warning: the xxxField methods are undocumented private methods. UITableViewController *vc = [self.viewControllers objectAtIndex:0]; UITableView *tvv = [vc view]; [[tvv toField] setUserInteractionEnabled:NO]; [[tvv ccField] setUserInteractionEnabled:NO]; [[tvv bccField] setUserInteractionEnabled:NO]; [[tvv multiField] setUserInteractionEnabled:NO]; [[tvv subjectField] setUserInteractionEnabled:NO]; } //This is the target for the back button, to immeditally dismiss the VC without an action sheet (#1) -(void) backButtonPressed:(id)sender { [self dismissModalViewControllerAnimated:YES]; } @end </code></pre> <p>To use in your code you would change: [[MFMailComposeViewController alloc] init]; to [[CustomMailComposeViewController alloc] init];</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload