isarathg
isarathg

Reputation: 878

Changing color of the titlebar, background and text of MFMailComposeViewController

I am sending email from my iPhone application. Everything working fine, but I want to change the color of the title bar that appears from blue to black and the background color from white to black. Also, all the text to white color.

What should I do? Anyone please help!

I used the below code:

- (IBAction)sendMail{
    MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc]init];

    mailComposer.mailComposeDelegate = self;

    if([MFMailComposeViewController canSendMail]){

        [mailComposer setToRecipients: [NSArray arrayWithObjects:@"[email protected]",nil]];

        [mailComposer setSubject: nil];

        [mailComposer setMessageBody: nil isHTML:NO];

        [self presentModalViewController:mailComposer animated: YES];

    }

Upvotes: 3

Views: 3816

Answers (2)

Warrior
Warrior

Reputation: 39374

For changing the navigation bar color , Try this

 [[mailComposer navigationBar] setTintColor:[UIColor blackColor]];

I dont know about other two.

All The Best.

Upvotes: 10

kennytm
kennytm

Reputation: 523214

You can't change the style of MFMailComposeViewController.


Of course you can change it by tweaking the subviews of mailComposer.view, but I don't guarantee Apple will accept this.

Upvotes: 0

Related Questions