Reputation: 14499
My App uses the iPhone SDK 3.0's new in-app email feature.
I want to change the tint color of the email UI to black and make it translucent.
I tried the following code,
/*
picker.navigationController.navigationBar.tintColor = [UIColor blackColor];
picker.navigationController.navigationBar.translucent = YES ;
*/
But it's changing the color of the view that creates,
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
the compose window, rather than the compose window itself.
Is this atleast possible? Or should we stick to Apple provided blue itself???
Upvotes: 6
Views: 6961
Reputation: 4425
You can also try this code....
MFMailComposeViewController *mailComposeView = [[MFMailComposeViewController alloc] init];
mailComposeView.navigationBar.tintColor = [UIColor cyanColor];
Upvotes: 0
Reputation: 1023
[[picker navigationBar] setTintColor:[UIColor blackColor]];
....makes the Cancel and Send buttons black too. They are not blue and do not change color when pressed.
Upvotes: 0
Reputation: 109
Since the MFMailComposeViewController is a subclass of UINavigationController, simply do this:
[[picker navigationBar] setTintColor:[UIColor redColor]];
Upvotes: 5
Reputation: 4102
The iPhone Human Interface Guidelines do not forbid to use custom colors but recommends the standard colors (blue and black).
Upvotes: 1
Reputation: 559
Yes it is possible.
Just add a objective-c category in the UINavigationBar class overriding the drawInRect Method. This way you can do want.
The disadvantage, all your navigation bars will change :)
Upvotes: 0