Change the color of the title, background and text of MFMailComposeViewController

I am sending an email from my iPhone application. Everything works fine, but I want to change the color of the title bar, which is displayed from blue to black, and the background color from white to black. In addition, all text is white.

What should I do? Someone please help!

I used the code below:

- (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]; } 
+4
source share
2 answers

To change the color of the navigation bar, try

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

I do not know about the other two.

All the best.

+11
source

You cannot change the style of MFMailComposeViewController .


Of course, you can change it by changing subviews mailComposer.view , but I can not guarantee that Apple will accept this.

0
source

Source: https://habr.com/ru/post/1305912/


All Articles