开发者

Changing color of the titlebar, background and text of MFMailComposeViewController

I am开发者_C百科 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:@"myemail@gmail.com",nil]];

        [mailComposer setSubject: nil];

        [mailComposer setMessageBody: nil isHTML:NO];

        [self presentModalViewController:mailComposer animated: YES];

    }


For changing the navigation bar color , Try this

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

I dont know about other two.

All The Best.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜