Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone SDK 3.0 in-app email - changing navigation bar tint color

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???

like image 689
Mugunth Avatar asked Jun 27 '09 04:06

Mugunth


People also ask

How do I change the navigation bar on my Iphone?

Change the Bar Style A user changes the navigation bar's style, or UIBarStyle , by tapping the “Style” button to the left of the main page. This button opens an action sheet where users can change the background's appearance to default, black-opaque, or black- translucent.

How do I change the color of my UINavigationBar?

Open the project's storyboard file. Select the UINavigationBar from your UINavigationController scene. In the Attributes Inspector pane turn on these Appearances: “Standard”, “Compact”, “Scroll Edge”, and “Compact Scroll Edge”. For all four appearances, set the “Background” to “System Red Color”, for example.


2 Answers

Since the MFMailComposeViewController is a subclass of UINavigationController, simply do this:

[[picker navigationBar] setTintColor:[UIColor redColor]];
like image 187
Aral Balkan Avatar answered Oct 04 '22 21:10

Aral Balkan


The iPhone Human Interface Guidelines do not forbid to use custom colors but recommends the standard colors (blue and black).

like image 23
swegi Avatar answered Oct 04 '22 20:10

swegi